Click or drag to resize
MathRound Method (Decimal)
Rounds a decimal value to the nearest integral value.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static decimal Round(
	decimal d
)

Parameters

d
Type: SystemDecimal
A decimal number to be rounded.

Return Value

Type: Decimal
The 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
ExceptionCondition
OverflowExceptionThe result is outside the range of a Decimal.
See Also