NumberFormatInfo.NumberGroupSeparator : NumberFormatInfo « System.Globalization « C# / C Sharp by API






NumberFormatInfo.NumberGroupSeparator

  

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();

      Console.WriteLine(123456.ToString("c", MyCulture));

      Vnf = MyCulture.NumberFormat;
      Vnf.CurrencyDecimalSeparator = ",";
      Vnf.CurrencyGroupSeparator = ".";
      Vnf.NumberDecimalSeparator = ",";
      Vnf.NumberGroupSeparator = ".";
      MyCulture.NumberFormat = Vnf;

      Console.WriteLine(123456.ToString("C", MyCulture));

   }
}

   
    
  








Related examples in the same category

1.new NumberFormatInfo()
2.NumberFormatInfo.CurrencyGroupSeparator
3.NumberFormatInfo.CurrencySymbol
4.NumberFormatInfo.NumberDecimalSeparator