I want to round 54.5345 to 54.54 that is if I have a third decimal place then i want to add 1 to the 2nd decimal place.
I have tried using math.round but it always rounds down if the third decimal is less than 5
I want to round 54.5345 to 54.54 that is if I have a third decimal place then i want to add 1 to the 2nd decimal place.
I have tried using math.round but it always rounds down if the third decimal is less than 5
I think you should try this:
double a = Math.Round(-57.5345, 2);
This works for negative numbers too.
The way you are rounding off is not correct.
You can also refer: