Type::IsInstanceOfType Method

Determines whether the specified object is an instance of the current Type.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

Parameters

o
Type: System::Object
The object to compare with the current Type.

Return Value

Type: System::Boolean
true if the current Type is in the inheritance hierarchy of the object represented by o, or if the current Type is an interface that o supports. false if neither of these conditions is the case, or if o is nullptr, or if the current Type is an open generic type (that is, ContainsGenericParameters returns true).

This method can be overridden by a derived class.

NoteNote:

A constructed type is not an instance of its generic type definition. That is, MyGenericList<int> (MyGenericList(Of Integer) in Visual Basic) is not an instance of MyGenericList<T> (MyGenericList(Of T) in Visual Basic).

The following example demonstrates the use of the IsInstanceOfType method.

No code example is currently available or this language may not be supported.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: