Find out Native Digits for number format in CSharp
Description
The following code shows how to find out Native Digits for number format.
Example
using System;//from w w w. j av a2s .co m
using System.Globalization;
using System.Threading;
class Sample
{
public static void Main()
{
CultureInfo currentCI = Thread.CurrentThread.CurrentCulture;
NumberFormatInfo nfi = currentCI.NumberFormat;
string[] nativeDigitList = nfi.NativeDigits;
Console.WriteLine("The native digits for the {0} culture are:", currentCI.Name);
foreach (string s in nativeDigitList)
{
Console.Write("\"{0}\" ", s);
}
}
}
The code above generates the following result.