Seb*_*son 57
var now = DateTime.Now;
var firstDayCurrentMonth = new DateTime(now.Year, now.Month, 1);
var lastDayLastMonth = firstDayCurrentMonth.AddDays(-1);
Run Code Online (Sandbox Code Playgroud)
Luk*_*keH 16
DateTime now = DateTime.Now;
DateTime lastDayOfLastMonth = now.Date.AddDays(-now.Day);
Run Code Online (Sandbox Code Playgroud)