System.DateTime.DayOfWeek Property

Gets the day of the week represented by this instance.

Syntax

public DayOfWeek DayOfWeek { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The value of the constants in the DayOfWeek enumeration ranges from DayOfWeek.Sunday to DayOfWeek.Saturday. If cast to an integer, its value ranges from zero (which indicates DayOfWeek.Sunday) to six (which indicates DayOfWeek.Saturday).

The DateTime.DayOfWeek property returns an enumerated constant; it does not reflect a system's regional and language settings. To retrieve a string representing a localized weekday name for a particular date, call one of the overloads of the erload:System.DateTime.ToString method that includes a format parameter and pass it either the ddd or dddd custom format strings. For details, see How to: Extract the Day of the Week from a Specific Date.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0