CSharp examples for System:DateTime Month
End Of Current month
public class Main{ public static DateTime EndOfCurrentmonth(this DateTime value) {/*from ww w. j a v a2 s. c om*/ var retVal = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 01); retVal = retVal.AddMonths(1).AddDays(-1); return new DateTime(retVal.Year, retVal.Month, retVal.Day); } }