var numberFormat = new NumberFormatInfo(); numberFormat.NumberDecimalSeparator = \".\"; numberFormat.NumberDecimalDigits = 2; decimal a = 10.00M; decimal b = 10M; Cons
The NumberDecimalDigits property is used with the "F" and "N" standard format strings, not the ToString method called without a format string.
NumberDecimalDigits
"F"
"N"
ToString
You can use:
Console.WriteLine(a.ToString("N", numberFormat));