numberformatter gujarati

Solutions on MaxInterview for numberformatter gujarati by the best coders in the world

showing results for - "numberformatter gujarati"
Camila
18 Jan 2018
1public string GetNativeRepresentation(double value)
2{
3    var format = CultureInfo.GetCultureInfo("gu-IN").NumberFormat;
4    return String.Join("", value.ToString(CultureInfo.InvariantCulture)
5                 .Select(x =>
6                 {
7                     if ("1234567890".Contains(x.ToString()))
8                         return format.NativeDigits[x - '0'];
9                     else if (x == '-')
10                         return format.NegativeSign;
11                     else if (x == '.')
12                         return format.NumberDecimalSeparator;
13                     else
14                         return x.ToString();
15                 }));
16}
17