I need to round up a number to 4 decimal places.
This answer does not help, because the method:
public static decimal RoundUp(this decimal input, int places)
{
decimal multiplier = Convert.ToDecimal(Math.Pow(10, Convert.ToDouble(places)));
return Math.Ceiling(input * multiplier) / multiplier;
}
will round up number 1.12333 to 1.1234 (as expected), but 1.123304 will be rounded up to 1.1233 and I need it to be 1.1234 too.