System.Globalization.NumberFormatInfo.GetInstance Method

Gets the System.Globalization.NumberFormatInfo associated with the specified IFormatProvider.

Syntax

public static NumberFormatInfo GetInstance (IFormatProvider formatProvider)

Parameters

formatProvider
The IFormatProvider used to get the System.Globalization.NumberFormatInfo.

Returns

The System.Globalization.NumberFormatInfo associated with the specified IFormatProvider.

Remarks

This method uses the IFormatProvider.GetFormat(Type) method of formatProvider using System.Globalization.NumberFormatInfo as the Type parameter. If formatProvider is null or if IFormatProvider.GetFormat(Type) returns null, this method returns NumberFormatInfo.CurrentInfo.

Your application gets a System.Globalization.NumberFormatInfo object for a specific culture using one of the following methods:

A System.Globalization.NumberFormatInfo object is created only for the invariant culture or for specific cultures, not for neutral cultures. For more information about the invariant culture, specific cultures, and neutral cultures, see the System.Globalization.CultureInfo class.

Requirements

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