Is there a way to do 'correct' arithmetical rounding in .NET? / C#
- by Markus
I'm trying to round a number to it's first decimal place and, considering the different MidpointRounding options, that seems to work well. A problem arises though when that number has sunsequent decimal places that would arithmetically affect the rounding.
An example:
With 0.1, 0.11..0.19 and 0.141..0.44 it works:
Math.Round(0.1, 1) == 0.1…