_Type.IsSubclassOf(Type) 方法

定義

為 COM 物件提供與版本無關的 IsSubclassOf(Type) 方法之存取權。Provides COM objects with version-independent access to the IsSubclassOf(Type) method.

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 相比較的 TypeThe Type to compare with the current Type.

傳回

如果 c 參數所表示的 Type 和目前的 Type 皆表示類別,而且目前 Type 所表示的類別衍生自 c 所表示的類別,則為 true;否則為 falsetrue if the Type represented by the c parameter and the current Type represent classes, and the class represented by the current Type derives from the class represented by c; otherwise, false. 如果 c 和目前的 Type 皆表示相同的類別,這個方法也會傳回 falseThis method also returns false if c and the current Type represent the same class.

備註

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會判斷目前Type所表示的類別是否衍生自指定Type的所表示的類別。 Type.IsSubclassOfThe Type.IsSubclassOf method determines whether the class represented by the current Type derives from the class represented by the specified Type.

適用於