Throws an InvalidCastException. Called by the ToType method.
[Visual Basic] Overridable Public Function ToUInt16() As UInt16 [C#] public virtual ushort ToUInt16(); [C++] public: virtual unsigned short ToUInt16(); [JScript] public function ToUInt16() : UInt16;
None, but the return value is typed ushort to implement the IConvertible interface.
Exception Type | Condition |
---|---|
InvalidCastException | (Always thrown.) |
If the ToType type is a ushort this method is called. This method throws an InvalidCastException().
DBNull Class | DBNull Members | System Namespace | ToType | IConvertible | Type | UInt16