Derive Number Format info from culture info
using System;
using System.Globalization;
using System.Threading;
class Class1 {
static void Main(string[] args) {
CultureInfo MyCulture = new CultureInfo(Thread.CurrentThread.CurrentUICulture.LCID);
NumberFormatInfo Vnf = new NumberFormatInfo();
Vnf = MyCulture.NumberFormat;
Vnf.CurrencyDecimalSeparator = ",";
Vnf.CurrencyGroupSeparator = ".";
Vnf.NumberDecimalSeparator = ",";
Vnf.NumberGroupSeparator = ".";
MyCulture.NumberFormat = Vnf;
CultureInfo FRCulture = new CultureInfo("fr-FR");
MyCulture.NumberFormat = FRCulture.NumberFormat;
Console.WriteLine(123456.ToString("c", MyCulture));
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
|