int noOfDays = DateTime.DaysInMonth(year, month); DateTime lastDayOfMonth = new DateTime(year, month, noOfDays); DateTime lastDayOfYear = new DateTime(year, 12, 31);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)