Rounds a decimal value to the nearest integer. A parameter specifies how
to round the value if it is midway between two other numbers.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static decimal Round(
decimal value,
MidpointRounding mode
)
Public Shared Function Round (
value As Decimal,
mode As MidpointRounding
) As Decimal
public:
static Decimal Round(
Decimal value,
MidpointRounding mode
)
static member Round :
value : decimal *
mode : MidpointRounding -> decimal
Parameters
- value
- Type: SystemDecimal
A decimal number to be rounded.
- mode
- Type: SystemMidpointRounding
Specification for how to round value if it is midway between two other numbers.
Return Value
Type:
Decimal
The integer nearest value. If value is halfway between two numbers, one of which
is even and the other odd, then mode determines which of the two is returned.
Reference