CSharp examples for System:DateTime Day
Determines whether specified object represents a Tuesday day of week.
using System.Globalization; using System;//from ww w . ja va2 s .c o m public class Main{ /// <summary> /// <para>Determines whether specified <see cref="DateTime"/> object represents a Tuesday day of week.</para> /// </summary> /// <param name="self">Date instance.</param> /// <returns><c>true</c> of <paramref name="self"/>'s day of week is Tuesday, false if not.</returns> /// <seealso cref="DateTime.DayOfWeek"/> public static bool Tuesday(this DateTime self) { return self.DayOfWeek == DayOfWeek.Tuesday; } }