System.Globalization.CultureInfo.NumberFormat Property

Gets or sets a System.Globalization.NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage.

Syntax

public virtual NumberFormatInfo NumberFormat { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Overrides

The user might choose to override some of the values associated with the current culture of Windows through the regional and language options portion of Control Panel. For example, the user might choose to display the date in a different format or to use a currency other than the default for the culture.

If CultureInfo.UseUserOverride is true and the specified culture matches the current culture of Windows, the System.Globalization.CultureInfo uses those overrides, including user settings for the properties of the System.Globalization.DateTimeFormatInfo instance returned by the CultureInfo.DateTimeFormat property, and the properties of the System.Globalization.NumberFormatInfo instance returned by the CultureInfo.NumberFormat property. If the user settings are incompatible with the culture associated with the System.Globalization.CultureInfo, for example, if the selected calendar is not one of the CultureInfo.OptionalCalendars, the results of the methods and the values of the properties are undefined.

The values of the CultureInfo.DateTimeFormat property and the CultureInfo.NumberFormat property are not calculated until the user accesses the property. If the user uses the Control Panel to change the current culture to a new culture while the application is running and then accesses the CultureInfo.DateTimeFormat or CultureInfo.NumberFormat property, the application retrieves the defaults for the new culture. not the overrides for the original culture. To preserve the overrides for the original current culture, the application should access the CultureInfo.DateTimeFormat and CultureInfo.NumberFormat properties before changing the current culture.

Requirements

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