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






CultureInfo.NumberFormat

 
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()
    {
       string[] cultures = new string[] { "en-US", "en-GB", "es-MX", "de-DE", "ja-JP" };

        using (TextWriter sw = Console.Out)
        {
            foreach (string c in cultures)
            {
                CultureInfo ci = new CultureInfo(c);

                double number = -100299.55;
                sw.WriteLine("    Currency: {0}", number.ToString("C", ci.NumberFormat));
            }
        }
    }
}

   
  








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.ToString()