System.DayOfWeek Enumeration

Specifies the day of the week.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public enum DayOfWeek

Remarks

The DayOfWeek enumeration represents the day of the week in calendars that have seven days per week. The value of the constants in this 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).

This enumeration is useful when it is desirable to have a strongly typed specification of the day of the week. For example, this enumeration is the type of the property value for the DateTime.DayOfWeek property.

The members of the DayOfWeek enumeration are not localized. To return the localized name of the day of the week, call the DateTime.ToString(string) or the DateTime.ToString(string, IFormatProvider) method with either the "ddd" or "dddd" format strings. The former format string produces the abbreviated weekday name; the latter produces the full weekday name.

Members

Member NameDescription
Friday

Indicates Friday.

Monday

Indicates Monday.

Saturday

Indicates Saturday.

Sunday

Indicates Sunday.

Thursday

Indicates Thursday.

Tuesday

Indicates Tuesday.

Wednesday

Indicates Wednesday.

Requirements

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