返回某年某月的最后一天

public  int GetMonthLastDate(int year, int month)
    {
        DateTime lastDay = new DateTime(year, month, new System.Globalization.GregorianCalendar().GetDaysInMonth(year,       

 month));
        int Day = lastDay.Day;
        return Day;
    }

多思考,多创新,才是正道!
原文地址:https://www.cnblogs.com/shuang121/p/1969843.html