var numberFormat = new NumberFormatInfo(); numberFormat.NumberDecimalSeparator = \".\"; numberFormat.NumberDecimalDigits = 2; decimal a = 10.00M; decimal b = 10M; Cons
Try this:
Console.WriteLine(String.Format("{0:0.00}", a)); Console.WriteLine(String.Format("{0:0.00}", b));
The output will have always 2 decimal cases. More examples here:
http://www.csharp-examples.net/string-format-double/