Converts this instance to a Char value
[Visual Basic] Overridable Public Function ToChar() As Char [C#] public virtual char ToChar(); [C++] public: virtual __wchar_t ToChar(); [JScript] public function ToChar() : Char;
The Char value for this instance.
Exception Type | Condition |
---|---|
InvalidCastException | If this DateTime is not a character. |
The ToChar method casts this DateTime instance into a Char value. An exception is thrown if this instance cannot be coerced into a Unicode character (char).
DateTime Structure | DateTime Members | System Namespace | Char | UnicodeEncoding