Create culture info from CurrentUICulture : CultureInfo I18N : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » CultureInfo I18N »

 

Create culture info from CurrentUICulture









    


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

   }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» CultureInfo I18N