Share via


_Assembly.IsDefined(Type, Boolean) 方法

定義

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

public:
 bool IsDefined(Type ^ attributeType, bool inherit);
public bool IsDefined (Type attributeType, bool inherit);
abstract member IsDefined : Type * bool -> bool
Public Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

參數

attributeType
Type

這個組件中要加以檢查的自訂屬性 Type

inherit
Boolean

這個類型的物件會忽略這個引數。

傳回

如果由指定 Type 識別的自訂屬性已經定義,則為 true;否則為 false

備註

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

方法 IsDefined 會指出是否已定義指定 Type 所識別的自訂屬性。

適用於

另請參閱