I need all values to rounded to two decimal places. So 1.401 should round to 1.40, but Math.Round(value, 2) rounds to 1.4.
Math.Round(value, 2)
How can I force the trailing zero?
1.4 is the same as 1.40 - you just want to display it differently. Use a format string when calling ToString - like value.ToString("0.00")
1.4
1.40
ToString
value.ToString("0.00")
1.4m articles
1.4m replys
5 comments
57.0k users