Decimal..::..Round Method (Decimal)
Rounds a decimal value to the nearest integer.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public static decimal Round( decimal d )
<TemplateAttribute> _ Public Shared Function Round ( _ d As Decimal _ ) As Decimal
[TemplateAttribute] public: static Decimal^ Round( Decimal^ d )
Parameters
- d
- Type: System..::..Decimal
A decimal number to round.
Return Value
The integer that is nearest to the d parameter. If d is halfway between two integers, one of which is even and the other odd, the even number is returned.Exceptions
Exception | Condition |
---|---|
System..::..OverflowException | The result is outside the range of a Decimal object. |