IsLastDayOfTheMonth

public static bool IsLastDayOfTheMonth(this DateTime dateTime)
{
    return dateTime == new DateTime(dateTime.Year, dateTime.Month, 1).AddMonths(1).AddDays(-1);
}
Example:
var isLastDay = DateTime.Now.IsLastDayOfTheMonth()

Description

Returns whether the given date is the last day of the month.

Details

Double click on the code to select all.

 

;