CSharp examples for System:DateTime Month
Get Month Last Date
using System;/*from w w w. ja v a 2s. c o m*/ public class Main{ public static 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; } }