This works:
inputValue = Math.Round(inputValue, 2);
More Related Contents:
- Double vs Decimal Rounding in C#
- How to generate an Array of Double Arrays in c#? [duplicate]
- Math.Round doesn’t behave like i want it to. (X.0xxxxx numbers) [closed]
- How do I parse a string with a decimal point to a double?
- How do you round a number to two decimal places in C#?
- When should I use double instead of decimal?
- Comparing double values in C#
- Truncate Two decimal places without rounding
- How To Represent 0.1 In Floating Point Arithmetic And Decimal
- How can I round up the time to the nearest X minutes?
- Round a double to x significant figures
- Converting string to double in C#
- C# Double – ToString() formatting with two decimal places but no rounding
- Double precision problems on .NET
- Limiting double to 3 decimal places
- Formatting a double to two decimal places
- Double.TryParse or Convert.ToDouble – which is faster and safer?
- Rounding integers to nearest multiple of 10 [duplicate]
- What’s the best way to compare Double and Int?
- Conversion of a decimal to double number in C# results in a difference
- Why is a round-trip conversion via a string not safe for a double?
- Rounding down to 2 decimal places in c#
- Performing Math operations on decimal datatype in C#?
- Input string was not in a correct format #2
- Why c# decimals can’t be initialized without the M suffix?
- Converting a double to an int in C#
- Round a decimal to the nearest quarter in C#
- Why is this simple calculation of two doubles inaccurate? [duplicate]
- C# Converting 20 digit precision double to string and back again
- How to round decimal value up to nearest 0.05 value?