MathRound Method (Decimal) |
Rounds a decimal value to the nearest integral value.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static decimal Round(
decimal d
)
Parameters
- d
- Type: SystemDecimal
A decimal number to be rounded.
Return Value
Type:
DecimalThe integer nearest parameter
d. If the fractional component of
d is halfway between two integers, one of which is even and the other odd, the even number is returned. Note that this method returns a
Decimal instead of an integral type.
Exceptions Exception | Condition |
---|
OverflowException | The result is outside the range of a Decimal. |
See Also