TypeInfo.IsAssignableFrom 方法

定義

多載

IsAssignableFrom(TypeInfo)

傳回值,這個值表示指定的類型是否可以指派到目前的類型。Returns a value that indicates whether the specified type can be assigned to the current type.

IsAssignableFrom(Type)

IsAssignableFrom(TypeInfo)

傳回值,這個值表示指定的類型是否可以指派到目前的類型。Returns a value that indicates whether the specified type can be assigned to the current type.

public:
 virtual bool IsAssignableFrom(System::Reflection::TypeInfo ^ typeInfo);
public virtual bool IsAssignableFrom (System.Reflection.TypeInfo typeInfo);
override this.IsAssignableFrom : System.Reflection.TypeInfo -> bool

參數

typeInfo
TypeInfo

要檢查的類型。The type to check.

傳回

如果指定的類型可以指派到這個類型,則為 true;否則為 falsetrue if the specified type can be assigned to this type; otherwise, false.

IsAssignableFrom(Type)

public:
 virtual bool IsAssignableFrom(Type ^ c);
public virtual bool IsAssignableFrom (Type c);
abstract member IsAssignableFrom : Type -> bool
override this.IsAssignableFrom : Type -> bool
Public Overridable Function IsAssignableFrom (c As Type) As Boolean

參數

c
Type

傳回

適用於