_Type.IsAssignableFrom(Type) _Type.IsAssignableFrom(Type) _Type.IsAssignableFrom(Type) _Type.IsAssignableFrom(Type) Method


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

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


Type Type Type Type

與目前的 Type 相比較的 TypeThe Type to compare with the current Type.


如果 c 和目前的 Type 表示相同類型,或者如果目前的 Typec 的繼承階層架構當中,或者如果目前的 Typec 實作的介面,或者如果 c 是泛型型別參數,而目前的 Type 表示 c 的條件約束之一,則為 truetrue if c and the current Type represent the same type, or if the current Type is in the inheritance hierarchy of c, or if the current Type is an interface that c implements, or if c is a generic type parameter and the current Type represents one of the constraints of c. 如果以上各項條件都不成立,或 cnull,則為 falsefalse if none of these conditions are the case, or if c is null.


這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.