System.Globalization.DateTimeFormatInfo.AbbreviatedMonthNames Property

Gets or sets a one-dimensional string array that contains the culture-specific abbreviated names of the months.

Syntax

public string[] AbbreviatedMonthNames { get; set; }

Value

A one-dimensional array of type string containing the abbreviated names of the months. For cultures with 12-month calendars the 13th element of the array is an empty string.

Exceptions

TypeReason
ArgumentNullExceptionThe value specified for a set operation is a null reference.
ArgumentExceptionThe value specified for a set operation is not an array with exactly 13 elements.
InvalidOperationExceptionThe current instance is read-only and a set operation was attempted.

Remarks

If you set this property, the array must be one-dimensional with exactly 13 elements. System.Globalization.Calendar objects accommodate calendars with 13 months.

If you set the DateTimeFormatInfo.AbbreviatedMonthNames property, you must also set the DateTimeFormatInfo.AbbreviatedMonthGenitiveNames property. The DateTimeFormatInfo.AbbreviatedMonthNames and DateTimeFormatInfo.AbbreviatedMonthGenitiveNames properties are used to format dates using the following format strings:

  • A standard date and time format string that aliases a custom format string that includes the "MMM" format specifier.

  • A custom date and time format string that includes the "MMM" format specifier.

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

Requirements

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