Send feedback on this topic.
Teradata.Client.Provider
Round(TdDecimal,Int32,MidpointRounding) Method



Teradata.Client.Provider Namespace > TdDecimal Structure > Round Method : Round(TdDecimal,Int32,MidpointRounding) Method
The TdDecimal that is to be rounded.
Decimal position where the rounding is to occurr.
Indicates how to round the input if it is midway between two numbers.
The number nearest the specified TdDecimal’s value and position is calculated. The mode is used to determine how the reslt will be rounded if it is midway between two other numbers.
Syntax
'Declaration
 
Public Overloads Shared Function Round( _
   ByVal input As TdDecimal, _
   ByVal position As Integer, _
   ByVal mode As MidpointRounding _
) As TdDecimal
'Usage
 
Dim input As TdDecimal
Dim position As Integer
Dim mode As MidpointRounding
Dim value As TdDecimal
 
value = TdDecimal.Round(input, position, mode)
public static TdDecimal Round( 
   TdDecimal input,
   int position,
   MidpointRounding mode
)
public:
static TdDecimal Round( 
   TdDecimal input,
   int position,
   MidpointRounding mode
) 

Parameters

input
The TdDecimal that is to be rounded.
position
Decimal position where the rounding is to occurr.
mode
Indicates how to round the input if it is midway between two numbers.

Return Value

The result of the round operation is returned as a TdDecimal
Exceptions
ExceptionDescription
Position is less than 0 or greater than 38.
mode is not a MidPointRounding value.
The result is not supported by TdDecimal.
Remarks
Please refer to MidpointRounding and TdDecimal.Round for more information on rounding behavior.
Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdDecimal Structure
TdDecimal Members
Overload List