What is NumberFormatInfo.NativeDigits used for?

51 views Asked by At

Consider the following code:

const int value = int.MaxValue;
CultureInfo culture = CultureInfo.GetCultureInfo("bn-IN");

Console.WriteLine(string.Join(",", culture.NumberFormat.NativeDigits));
Console.WriteLine(value.ToString(culture));
Console.WriteLine(value.ToString(culture.NumberFormat));

Result

০,১,২,৩,৪,৫,৬,৭,৮,৯

2147483647

2147483647

In this example, NativeDigits was not used to format the number, as in both cases they were formatted using 0-9

What then are NativeDigits used for?

0

There are 0 answers