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