Decimal Math.Round(Decimal) Method
Rounds a decimal value to the nearest integral value.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
The integer nearest parameter value. If the fractional component of value 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 System.Decimal instead of an integral type.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static decimal Round(
decimal value
)
Parameters
- value Decimal
- A decimal number to be rounded.
Return Value
DecimalThe integer nearest parameter value. If the fractional component of value 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 System.Decimal instead of an integral type.
Exceptions
Overflow | The result is outside the range of a System.Decimal. |