Export (0) Print
Expand All

DateTimeFormatInfo.MonthNames Property

Gets or sets a one-dimensional array of type String containing the culture-specific full names of the months.

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

public string[] MonthNames { get; set; }

Property Value

Type: System.String[]
A one-dimensional array of type String containing the culture-specific full names of the months. In a 12-month calendar, the 13th element of the array is an empty string. The array for InvariantInfo contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", and "".

ExceptionCondition
ArgumentNullException

An attempt was made to set the property to null.

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 13.

InvalidOperationException

The DateTimeFormatInfo object is read-only.

When this property is set, the array must be one-dimensional and must have exactly 13 elements. Calendar objects accommodate calendars with 13 months.

If a custom date and time format string includes the "MMMM" format specifier, DateTime.ToString returns the appropriate element from the MonthNames property array in place of "MMMM" in the custom format string.

This property is affected if the value of the Calendar property changes.

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

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

Community Additions

ADD
Show:
© 2014 Microsoft