_Type.IsInstanceOfType(Object) _Type.IsInstanceOfType(Object) _Type.IsInstanceOfType(Object) _Type.IsInstanceOfType(Object) Method

定义

为 COM 对象提供对 IsInstanceOfType(Object) 方法的版本无关的访问。Provides COM objects with version-independent access to the IsInstanceOfType(Object) method.

public:
 bool IsInstanceOfType(System::Object ^ o);
public bool IsInstanceOfType (object o);
abstract member IsInstanceOfType : obj -> bool
Public Function IsInstanceOfType (o As Object) As Boolean

参数

o
Object Object Object Object

将与当前 Type 进行比较的对象。The object to compare with the current Type.

返回

如果满足下列任一条件,则为 true:当前 Type 位于由 o 表示的对象的继承层次结构中;当前 Typeo 支持的接口。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. 如果不属于其中任一种情况,或者 onull 或者当前 Type 为开放式泛型类型(即 ContainsGenericParameters 返回 true),则为 falsefalse if neither of these conditions is the case, or if o is null, or if the current Type is an open generic type (that is, ContainsGenericParameters returns true).

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.IsInstanceOfType方法确定指定的对象是否为当前实例TypeThe Type.IsInstanceOfType method determines whether the specified object is an instance of the current Type.

适用于