I want a rounding method on double values in C#. It needs to be able to round a double value to any rounding precision value. My code on hand looks like:
pub
Example of using decimal, as Kibbee pointed out
decimal
double d = 1.275; Math.Round(d, 2); // 1.27 Math.Round((decimal)d, 2); // 1.28