C# generate decimal number with two decimals places code example
Example 1: c# double value with 2 decimal places
inputValue = Math.Round(inputValue, 2);
Example 2: decimal c# 2 digits
decimal.Round(yourValue, 2, MidpointRounding.AwayFromZero);
inputValue = Math.Round(inputValue, 2);
decimal.Round(yourValue, 2, MidpointRounding.AwayFromZero);