c# round decimal to 2 decimal places code example
Example 1: c# double value with 2 decimal places
inputValue = Math.Round(inputValue, 2);
Example 2: set decimal point c#
decimalVar.ToString ("#.##"); // returns "" when decimalVar == 0
or
decimalVar.ToString ("0.##"); // returns "0" when decimalVar == 0