Converts this instance of a Boolean a Char.
[Visual Basic] Overridable Public Function ToChar() As Char [C#] public virtual char ToChar(); [C++] public: virtual __wchar_t ToChar(); [JScript] public function ToChar() : Char;
A character.
Exception Type | Condition |
---|---|
InvalidCastException | If it doesn't return a character. |
The ToChar method returns a character value.
This method implements IConvertible, which replaced IValue. This method is used to obtain the type code for a specified object. (See the TypeCode enumeration for more information about type codes, Convert, and ToChar.)