Send feedback on this topic.
Teradata.Client.Provider
Explicit Type Conversion(TdDecimal,TdNumber) Operator



Teradata.Client.Provider Namespace > TdNumber Structure > Explicit Type Conversion Operator : Explicit Type Conversion(TdDecimal,TdNumber) Operator
The TdNumber that will be converted.
Converts a TdNumber to a TdDecimal.
Syntax
'Declaration
 
Overloads Public Operator Narrowing CType( _
   ByVal input As TdNumber _
) As TdDecimal
'Usage
 
public TdDecimal operator explicit( 
   TdNumber input
)
public:
TdDecimal operator explicit( 
   TdNumber input
)

Parameters

input
The TdNumber that will be converted.

Return Value

A TdDecimal is returned.
Exceptions
ExceptionDescription
The number represented by input cannot be contained in a TdDecimal.
Remarks

If the number contained in input is very close to zero, the TdDecimal instance that is returned will be zero. For example, suppose an instance of TdNumber contains the number 9.231356e-50. When this number is converted into an instance of TdDecimal, the number that the instance contains is zero. The reason for this is that the maximum precision of a TdDecimal is 38, and the first 38 digits that are to the right of the decimal point of the number are all zeroes.

Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdNumber Structure
TdNumber Members
Overload List