public static DateTime ToLastDayOfMonth(this DateTime dt) { return new DateTime(dt.Year,dt.Month,DateTime.DaysInMonth(dt.Year,dt.Month)); }