_Type.IsSubclassOf(Type) 方法

定義

為 COM 物件提供與版本無關的 IsSubclassOf(Type) 方法之存取權。

public:
 bool IsSubclassOf(Type ^ c);
public bool IsSubclassOf (Type c);
abstract member IsSubclassOf : Type -> bool
Public Function IsSubclassOf (c As Type) As Boolean

參數

c
Type

與目前的 Type 相比較的 Type

傳回

如果 c 參數所表示的 Type 和目前的 Type 皆表示類別,而且目前 Type 所表示的類別衍生自 c 所表示的類別,則為 true;否則為 false。 如果 c 和目前的 Type 皆表示相同的類別,這個方法也會傳回 false

備註

此方法適用于從 Unmanaged 程式碼存取 Managed 類別,不應從 Managed 程式碼呼叫。

方法 Type.IsSubclassOf 會判斷目前 Type 所表示的類別是否衍生自指定 Type 所表示的類別。

適用於