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 | 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 the System.Reflection. (For information, see System.Object.ToType and DefaultToType).
Boolean Structure | Boolean Members | System Namespace | IConvertible | Convert