Assuming an invariant culture, is it possible to define a different group separator in the format – than the comma?
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Console.WriteLine(String.Format("{0:#,##0}", 2295));
Output:
2,295
Desired output:
2.295
The invariant culture is a requirement because currencies from many different locales are being formatted with format strings, that have been user defined. Ie for Denmark they have defined the price format to be “{0:0},-“, while for Ireland it might be “€{0:#,##0}”.
When you have different format strings, this does not mean that you have to use InvariantCulture. If you have a format string for germany e.g. you format this string using the Culture(“de-de”):
Alternatively you can specify your custom number format info: