NumberFormatInfo Defines how numeric values are formatted and displayed, depending on the culture. : NumberFormatInfo « Data Types « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Date Time
8.Design Patterns
9.Development Class
10.Event
11.File Stream
12.Generics
13.GUI Windows Form
14.Internationalization I18N
15.Language Basics
16.LINQ
17.Network
18.Office
19.Reflection
20.Regular Expressions
21.Security
22.Services Event
23.Thread
24.Web Services
25.Windows
26.Windows Presentation Foundation
27.XML
28.XML LINQ
C# / C Sharp » Data Types » NumberFormatInfoScreenshots 
NumberFormatInfo Defines how numeric values are formatted and displayed, depending on the culture.
 

using System;
using System.Globalization;
using System.Text;

public sealed class App 
{
    static void Main() 
    {
        StringBuilder sb = new StringBuilder();
        foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures)) 
        {
            if (ci.TwoLetterISOLanguageName != "en"continue;
            NumberFormatInfo nfi = ci.NumberFormat;
            sb.AppendFormat("The currency symbol for '{0}' is '{1}'",ci.DisplayName, nfi.CurrencySymbol);
            sb.AppendLine();
        }
        Console.WriteLine(sb.ToString());
    }
}

   
  
Related examples in the same category
1.NumberFormatInfo.CurrencyDecimalDigits Indicates the number of decimal places to use in currency values.
2.NumberFormatInfo.Currency Decimal Separator
3.NumberFormatInfo.Currency Group Separator
4.NumberFormatInfo.Currency Group Sizes
5.NumberFormatInfo.Currency Symbol
6.NumberFormatInfo.Digit Substitution
7.NumberFormatInfo properties: Currency
8.NumberFormatInfo properties: Number
9.NumberFormatInfo properties: Percent
10.NumberFormatInfo.Native Digits
11.NumberFormatInfo.Number Decimal Digits
12.NumberFormatInfo.Number Decimal Separator
13.NumberFormatInfo.Number Group Separator Property
14.NumberFormatInfo.Number Group Sizes
15.Displays the value with three elements in the GroupSize array.
16.Displays the value with zero as the last element in the GroupSize array.
17.NumberFormatInfo.Number Negative Pattern
18.NumberFormatInfo.Percent Decimal Digits
19.NumberFormatInfo.Percent Decimal Separator
20.NumberFormatInfo.Percent Group Separator
21.NumberFormatInfo.Percent Group Sizes
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.