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



Teradata.Client.Provider Namespace > TdNumber Structure > Explicit Type Conversion Operator : Explicit Type Conversion(Double,TdNumber) Operator
A TdNumber
Converts a TdNumber to a System.Double.
Syntax
'Declaration
 
Overloads Public Operator Narrowing CType( _
   ByVal input As TdNumber _
) As Double
'Usage
 
public double operator explicit( 
   TdNumber input
)
public:
double operator explicit( 
   TdNumber input
)

Parameters

input
A TdNumber

Return Value

A Double is returned.
Exceptions
ExceptionDescription
The value of the TdNumber is Null.
Remarks

When a TdNumber is converted into a System.Double a rounding error may occur.

The reason for this is that the mantissa of a Double has a precision of 16 digits. A TdNumber has a precision of 40 digits. When a TdNumber is converted to a System.Double, it will be truncated at the 17th position from the left.

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