c sharp two decimal places code example
Example 1: c# double value with 2 decimal places
inputValue = Math.Round(inputValue, 2);
Example 2: decimal places c#
decimalVar.ToString("F");
inputValue = Math.Round(inputValue, 2);
decimalVar.ToString("F");