Converts a Decimal to an unsigned Byte.
[Visual Basic] Overloads Public Shared Function ToByte( _ ByVal value As Decimal _ ) As Byte [C#] public static byte ToByte( Decimal value ); [C++] public: static unsigned char ToByte( Decimal value ); [JScript] public static function ToByte( value : Decimal ) : Byte;
The result of converting the argument to an unsigned byte.
Exception Type | Condition |
---|---|
OverflowException | is thrown if the resulting integer value is less than Byte.MinValue or greater than Byte.MaxValue. |
The Decimal value is rounded toward zero to the nearest integer value, and the result of this operation is returned as a byte.
Decimal Structure | Decimal Members | System Namespace | Decimal.ToByte Overload List