Is there any way to round up decimal value to its nearest 0.05 value in .Net?
Ex:
7.125 -> 7.15
6.66 -> 6.7
If its now available can anyone provide me the algo?
Is there any way to round up decimal value to its nearest 0.05 value in .Net?
Ex:
7.125 -> 7.15
6.66 -> 6.7
If its now available can anyone provide me the algo?
Math..::.Round Method (Decimal, Int32, MidpointRounding)
Rounds a double-precision floating-point value to the specified number of fractional digits. A parameter specifies how to round the value if it is midway between two other numbers.
Math.Round(1.489,2,MidpointRounding.AwayFromZero)