MathRound Method (Double, Int32) |
Rounds a double-precision floating-point value to a specified number of fractional digits.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static double Round(
double value,
int digits
)
Parameters
- value
- Type: SystemDouble
A double-precision floating-point number to be rounded. - digits
- Type: SystemInt32
The number of fractional digits in the return value.
Return Value
Type:
DoubleThe number nearest to
value that contains a number of fractional digits equal to
digits.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | digits is less than 0 or greater than 15. |
See Also