NullableTypes Class Library

NullableDecimal.Round Method 

Rounds a NullableDecimal value to a specified number of decimal places.

[Visual Basic]
Public Shared Function Round( _
   ByVal x As NullableDecimal, _
   ByVal decimals As Integer _
) As NullableDecimal
[C#]
public static NullableDecimal Round(
   NullableDecimal x,
   int decimals
);

Parameters

x
A NullableDecimal structure.
decimals
A value from 0 to 28 that specifies the number of decimal places to round to.

Return Value

Null if x is Null otherwise a number equivalent to rounded to number of decimal places.

Exceptions

Exception TypeCondition
ArgumentOutOfRangeException is not a value from 0 to 28.

See Also

NullableDecimal Class | NullableTypes Namespace