I would like to format decimal numbers to the NEXT 0.10 cents (dime) in C# like so:
22.62 -> 22.70
23.50 -> 22.50
23.21 -> 23.30
23.03 -> 23.10
23.10 -> 23.10
23.14 -> 23.20
23.17 -> 23.20
23.11 -> 23.20
Any help would be appreciated. Thanks
What I have so far:
Math.Round(22.621, 1, MidpointRounding.AwayFromZero) //gives 22.60
Math.Round(22.656, 1, MidpointRounding.AwayFromZero) //gives 22.70