返回某年某月的最后一天

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;
    }

posted @ 2011-03-03 13:56  双魂人生  阅读(168)  评论(0编辑  收藏  举报