I am looking for a way to round to the nearest dollar with the following stipulations:
(If wholenumber.50 and above round up to the next whole number)
(If wholenumber.49 and below round down to the current whole number)
I have tried:
Math.Round(wholenumber.xx, MidpointRounding.ToEven);
This doesn't always round how I want for instance 1.5 = 2 and 2.5 = 2 as it rounds to nearest even number.
I have also tried:
Math.Round(wholenumber.xx, MidpointRounding.AwayFromZero);
This always rounds up to the higher whole number.
Is there any built in functionality for what I am trying to do or will I need to write my own custom method to check the number and do floor or ceil depending?