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 of the specified object.
Exception Type | Condition |
---|---|
InvalidCastException | is thrown if it doesn't return a type. |
The ToType method allows a means of reaching the Type class, which provides the functionality of several different services of the runtime, such as accessing the metadata and reflection.