Normally I use the below code, but is there a better way?
lastOfMonth = new DateTime(Now.Year, Now.Month, 1).AddMonths(1).AddDays(-1)
I use
DateTime now = DateTime.Today; var lastDate = new DateTime(now.Year, now.Month, DateTime.DaysInMonth(now.Year, now.Month));