Retrieves the Type for a specified object.
[Visual Basic] Overridable Public Function ToType( _ ByVal type As Type _ ) As Object [C#] public virtual object ToType( Type type ); [C++] public: virtual Object* ToType( Type* type ); [JScript] public function ToType( type : Type ) : Object;
The Type identification of the specified object.
Exception Type | Condition |
---|---|
InvalidCastException | If it is the wrong type. |
The ToType method accesses the Type class to return the classification of an object, whether it is a class, a interface, an enumeration, a method, a property, or a field.