CultureInfo.CreateSpecificCulture : CultureInfo « System.Globalization « C# / C Sharp by API






CultureInfo.CreateSpecificCulture

 

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Text;
using System.Threading;
using System.Globalization;

public class MainClass
{
    public static void Main()
    {
        decimal money = 1250.75m;
        string[] cultures = { "en-US", "en-GB", "ja", "ar" };
        Console.OutputEncoding = Encoding.UTF8;
        foreach (string culture in cultures)
        {
            CultureInfo cultureInfo = CultureInfo.CreateSpecificCulture(culture);
            Console.WriteLine("{0} = {1}", cultureInfo.DisplayName,money.ToString("C", cultureInfo));
        }
    }
}

   
  








Related examples in the same category

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