Converts this instance to a Byte value
[Visual Basic] Overridable Public Function ToByte() As Byte [C#] public virtual byte ToByte(); [C++] public: virtual unsigned char ToByte(); [JScript] public function ToByte() : Byte;
The Byte value for this instance.
Exception Type | Condition |
---|---|
InvalidCastException | If this DateTime cannot be a Byte. |
The ToByte method casts this DateTime instance into an Byte value. An exception is thrown if this instance cannot be coerced into an 8-bit unsigned integer (byte).
DateTime Structure | DateTime Members | System Namespace | Byte | SByte