A string containing the format pattern for a month and day value.
Type Reason ArgumentNullException The value specified for a set operation is a null reference. InvalidOperationException The current instance is read-only and a set operation was attempted.
The DateTimeFormatInfo.MonthDayPattern property defines the culture-specific format of date strings that are returned by calls to the DateTime.ToString and DateTimeOffset.ToString methods and by composite format strings that are supplied the "m" and "M" standard format strings.
This property is affected if the value of the DateTimeFormatInfo.Calendar property changes.
We recommend that you set the date separator in the month and day pattern to an exact string instead of using the date separator placeholder. For example, to obtain the pattern MM-DD, set the month and day pattern to "MM-DD".