How do you get to the nearest even cent ?. So, for the following decimal places, I want to round and display the amount in dollars:
1230.3092 => $1230.30
221.9672 => $221.96
12345.6808 => 12345.68
I tried this
Math.Round(value, 2, MidpointRounding.ToEven)
decimal.Round(value, 2, MidpointRounding.ToEven)
but for some reason it is rounded.
source
share