I need
Math.Round(42.5447, 2, MidpointRounding.AwayFromZero)
to result in 42.55
, but not in 42.54
as it does.
How to achieve this?
I need
Math.Round(42.5447, 2, MidpointRounding.AwayFromZero)
to result in 42.55
, but not in 42.54
as it does.
How to achieve this?
Try Ceiling
instead, with some multiply/divide trick:
Math.Ceiling((42.5447 * 100))/ 100