CSharp examples for System:DateTime Day
Determines whether the specified date is tuesday.
using System;//w w w . j ava 2s . co m public class Main{ /// <summary> /// Determines whether the specified date is tuesday. /// </summary> /// <param name="date">The date.</param> /// <returns></returns> public static bool IsTuesday(this DateTime date) { DayOfWeek dayOfWeek = date.DayOfWeek; bool isTuesday = dayOfWeek == DayOfWeek.Tuesday; return isTuesday; } }