Converts a Decimal to an unsigned Byte.
[Visual Basic] Overloads Overridable Public Function ToByte() As Byte [C#] public virtual byte ToByte(); [C++] public: virtual unsigned char ToByte(); [JScript] public function ToByte() : 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