CSharp examples for System:DateTime Day
Determines whether the specified date is monday.
using System;//w ww . j a v a 2 s. c om public class Main{ /// <summary> /// Determines whether the specified date is monday. /// </summary> /// <param name="date">The date.</param> /// <returns></returns> public static bool IsMonday(this DateTime date) { DayOfWeek dayOfWeek = date.DayOfWeek; bool isMonday = dayOfWeek == DayOfWeek.Monday; return isMonday; } }