Partager via


DateTimeFormatInfo.GetDayName Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the culture-specific full name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.

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

Syntax

'Declaration
Public Function GetDayName ( _
    dayofweek As DayOfWeek _
) As String
public string GetDayName(
    DayOfWeek dayofweek
)

Parameters

Return Value

Type: System.String
The culture-specific full name of the day of the week represented by dayofweek.

Exceptions

Exception Condition
ArgumentOutOfRangeException

dayofweek is not a valid System.DayOfWeek value.

Remarks

For the default invariant DateTimeFormatInfo, this method returns a string from the GregorianCalendar.

dayofweek

Return value

Sunday

"Sunday"

Monday

"Monday"

Tuesday

"Tuesday"

Wednesday

"Wednesday"

Thursday

"Thursday"

Friday

"Friday"

Saturday

"Saturday"

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.