Send feedback on this topic.
Teradata.Client.Provider
ToInt16 Method (TdNumber)



Teradata.Client.Provider Namespace > TdNumber Structure : ToInt16 Method
The TdNumber that is to be converted to a 16-bit signed integer.
Converts the value of the specified TdNumber into the equivalent Int16.
Syntax
'Declaration
 
Public Shared Function ToInt16( _
   ByVal input As TdNumber _
) As Short
'Usage
 
Dim input As TdNumber
Dim value As Short
 
value = TdNumber.ToInt16(input)
public static short ToInt16( 
   TdNumber input
)
public:
static short ToInt16( 
   TdNumber input
) 

Parameters

input
The TdNumber that is to be converted to a 16-bit signed integer.

Return Value

A 16-bit signed integer value that is equivalent to the TdNumber is returned.
Exceptions
ExceptionDescription
The value of input is Null.
The TdNumber could not be converted to Int16.
Remarks
When a TdNumber that has a scale greater than 0 is converted to a 16-bit signed integer the fractional part of the number will be truncated.
Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdNumber Structure
TdNumber Members