|
Il presente articolo è stato tradotto automaticamente. Passare il puntatore sulle frasi nell'articolo per visualizzare il testo originale. Ulteriori informazioni.
|
Traduzione
Originale
|
Proprietà NumberFormatInfo.CurrencyGroupSeparator
.NET Framework 4.5
Spazio dei nomi: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Valore proprietà
Tipo: System.String| Eccezione | Condizione |
|---|---|
| ArgumentNullException | |
| InvalidOperationException |
using System; using System.Globalization; class NumberFormatInfoSample { public static void Main() { // Gets a NumberFormatInfo associated with the en-US culture. NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat; // Displays a value with the default separator (","). Int64 myInt = 123456789; Console.WriteLine( myInt.ToString( "C", nfi ) ); // Displays the same value with a blank as the separator. nfi.CurrencyGroupSeparator = " "; Console.WriteLine( myInt.ToString( "C", nfi ) ); } } /* This code produces the following output. $123,456,789.00 $123 456 789.00 */
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (ruoli di base del server non supportati), Windows Server 2008 R2 (ruoli di base del server supportati con SP1 o versione successiva, Itanium non supportato)
.NET Framework non supporta tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.