CultureInfo.ToString() : CultureInfo « System.Globalization « C# / C Sharp by API






CultureInfo.ToString()

 

using System;
using System.Globalization;

class MainClass
{
  public static void Main() 
  {
    DateTime dtNow = DateTime.Now;
    Double curOriginal = 12345.67;

    CultureInfo ci = new CultureInfo("en-US");
    string sLocalizedDate = dtNow.ToString("d", ci);
    string sLocalizedCur = curOriginal.ToString("c", ci);

    // print them out
    Console.WriteLine(sLocalizedDate);
    Console.WriteLine(sLocalizedCur);

  }

}

   
  








Related examples in the same category

1.new CultureInfo(String cult)
2.CultureInfo.Calendar
3.CultureInfo.CreateSpecificCulture
4.CultureInfo.CurrentCulture
5.CultureInfo.CurrentUICulture
6.CultureInfo.DateTimeFormat
7.CultureInfo.DisplayName
8.CultureInfo.EnglishName
9.CultureInfo.GetCultures
10.CultureInfo.GetCultureInfo(String name)
11.CultureInfo.NativeName
12.CultureInfo.NumberFormat