Partager via


DateTimeFormatInfo.AbbreviatedDayNames Property

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

Gets or sets a one-dimensional array of type String containing the culture-specific abbreviated names of the days of the week.

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

Syntax

'Declaration
Public Property AbbreviatedDayNames As String()
public string[] AbbreviatedDayNames { get; set; }

Property Value

Type: array<System.String[]
A one-dimensional array of type String containing the culture-specific abbreviated names of the days of the week. The array for InvariantInfo contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat".

Exceptions

Exception Condition
ArgumentNullException

An attempt was made to set the property to nulla null reference (Nothing in Visual Basic).

ArgumentException

An attempt was made to set the property to a multidimensional array or to a single-dimensional array with a length that is not exactly 7.

InvalidOperationException

The DateTimeFormatInfo object is read-only.

Remarks

If setting this property, the array must be one-dimensional and must have exactly seven elements.

If a custom format string includes the format specifier "ddd", DateTime.ToString returns the value of the appropriate element of the AbbreviatedDayNames array in place of "ddd" in the format string.

This property is affected if the value of the Calendar property changes. If the selected Calendar does not support abbreviated day names, the array contains the full day names.

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.