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