Επεξεργασία

Κοινή χρήση μέσω


NumberFormatInfo.GetInstance(IFormatProvider) Method

Definition

Gets the NumberFormatInfo associated with the specified IFormatProvider.

public:
 static System::Globalization::NumberFormatInfo ^ GetInstance(IFormatProvider ^ formatProvider);
public static System.Globalization.NumberFormatInfo GetInstance (IFormatProvider formatProvider);
public static System.Globalization.NumberFormatInfo GetInstance (IFormatProvider? formatProvider);
static member GetInstance : IFormatProvider -> System.Globalization.NumberFormatInfo
Public Shared Function GetInstance (formatProvider As IFormatProvider) As NumberFormatInfo

Parameters

formatProvider
IFormatProvider

The IFormatProvider used to get the NumberFormatInfo.

-or-

null to get CurrentInfo.

Returns

The NumberFormatInfo associated with the specified IFormatProvider.

Remarks

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

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

A 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 CultureInfo class.

Applies to

See also