NumberFormatInfo Class defines how to format numbers : NumberFormatInfo « Internationalization I18N « VB.Net






NumberFormatInfo Class defines how to format numbers

 

Imports System.Globalization
Imports System.Text

Public Module Example
   Public Sub Main()
      Dim sb As New StringBuilder()

      Dim cultureNames() As String = {"en", "en-AU", "en-BZ", "en-CA", "en-029", _ 
                                      "en-TT", "en-GB", "en-US", "en-ZW" }

      For Each cultureName As String In cultureNames
         Dim ci As New CultureInfo(cultureName)
         Dim nfi As NumberFormatInfo = ci.NumberFormat
         Console.WriteLine(ci.DisplayName)
         Console.WriteLine(nfi.CurrencySymbol)
      Next

   End Sub
End Module

   
  








Related examples in the same category

1.NumberFormatInfo.CurrencyDecimalDigits tells the number of decimal places to use in currency values.
2.NumberFormatInfo.CurrencyDecimalSeparator
3.NumberFormatInfo.CurrencyGroupSeparator
4.NumberFormatInfo.CurrencyGroupSizes
5.NumberFormatInfo.DigitSubstitution
6.NumberFormatInfo.InvariantInfo
7.NumberFormatInfo number format properties
8.NumberFormatInfo percent format properties
9.NumberFormatInfo.NativeDigits gets or sets native digits equivalent to the Western digits 0 through 9.
10.NumberFormatInfo.NumberDecimalDigits
11.NumberFormatInfo.NumberDecimalSeparator gets or sets decimal separator in numeric values.
12.NumberFormatInfo.NumberGroupSeparator
13.NumberFormatInfo.NumberGroupSizes
14.NumberFormatInfo.NumberNegativePattern
15.NumberFormatInfo.PercentDecimalDigits
16.NumberFormatInfo.PercentDecimalSeparator
17.NumberFormatInfo.PercentGroupSeparator
18.Displays the value with default formatting
19.Displays a negative value with the default number of decimal digits (2)
20.Displays the same value with four decimal digits
21.Displays the same value with a blank as the separator
22.Displays a value with the default separator (",")
23.Displays the same value with a blank as the separator
24.Displays a value with the default separator (".")
25.Displays with different groupings
26.Currency Symbol codes