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