c# round double to 2 decimal places if the decimals are not zero code example Example: c# double value with 2 decimal places inputValue = Math.Round(inputValue, 2);