Rounding up in C#
Posted on Tuesday, 02 June 2009 10:40A quick post about rounding up in C#. To round up, you simply use the Math.Ceiling method.
double a = 3;
double b = 7;
double c = Math.Ceiling((double)b / a);
The output of this calculation would be 3, not 2.5.