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



Teradata.Client.Provider Namespace > TdNumber Structure : ToByte Method
The TdNumber that is to be converted to a 8-bit unsigned integer.
Converts the value of the specified TdNumber to the equivalent Byte.
Syntax
'Declaration
 
Public Shared Function ToByte( _
   ByVal input As TdNumber _
) As Byte
'Usage
 
Dim input As TdNumber
Dim value As Byte
 
value = TdNumber.ToByte(input)
public static byte ToByte( 
   TdNumber input
)
public:
static byte ToByte( 
   TdNumber input
) 

Parameters

input
The TdNumber that is to be converted to a 8-bit unsigned integer.

Return Value

An 8-bit unsigned integer value that is equivalent to the specified TdNumber is returned.
Exceptions
ExceptionDescription
The value of input is Null.
The TdNumber could not be converted to a Byte.
Remarks
When a TdNumber that has a scale greater than 0 is converted to a 8-bit unsigned 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