NumberFormatInfo.GetInstance(IFormatProvider) Metodo

Definizione

Ottiene l'oggetto NumberFormatInfo associato all'oggetto IFormatProvider specificato.

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

Parametri

formatProvider
IFormatProvider

Oggetto IFormatProvider usato per ottenere NumberFormatInfo.

-oppure- null per ottenere CurrentInfo.

Restituisce

NumberFormatInfo

Oggetto NumberFormatInfo associato all'oggetto IFormatProvider specificato.

Commenti

Questo metodo usa il IFormatProvider.GetFormat metodo di utilizzando come parametro formatProvider NumberFormatInfo Type. Se formatProvider è o se restituisce , questo metodo restituisce null IFormatProvider.GetFormat null CurrentInfo .

L'applicazione ottiene NumberFormatInfo un oggetto per impostazioni cultura specifiche usando uno dei metodi seguenti:

Un oggetto viene creato solo per le impostazioni cultura invarianti o per impostazioni NumberFormatInfo cultura specifiche, non per le impostazioni cultura non indipendenti. Per altre informazioni sulle impostazioni cultura invarianti, impostazioni cultura specifiche e impostazioni cultura non specifiche, vedere la CultureInfo classe .

Si applica a

Vedi anche