Share via


DayOfWeek Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the day of the week represented by this instance.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public ReadOnly Property DayOfWeek As DayOfWeek
public DayOfWeek DayOfWeek { get; }
public:
property DayOfWeek DayOfWeek {
    DayOfWeek get ();
}
member DayOfWeek : DayOfWeek with get
function get DayOfWeek () : DayOfWeek

Property Value

Type: System. . :: . .DayOfWeek
An enumerated constant that indicates the day of the week of this DateTime value.

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 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 ToString method that includes a format parameter and pass it either the ddd or dddd custom format strings.

.NET Framework Security

See Also

Reference

DateTime Structure

System Namespace