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
Something like this should work for any step, not just 0.05:
private decimal RoundUp (decimal value, decimal step) { var multiplicand = Math.Ceiling (value / step); return step * multiplicand; }