We have DayOfWeek in-built property of Date class and DayOfWeek enum which has Sunday,Monday,Tuesday and so on. value through which we can check as:- If DayOfWeek is Saturday or Sunday then it's Holiday. public static bool IsHoliday(this DateTime Date)
{
if (Date.DayOfWeek == DayOfWeek.Saturday || Date.DayOfWeek == DayOfWeek.Sunday)
{
return true;
}
return false;
}