ModuleBuilder.IsDefined(Type, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個值,表示該模組是否已套用指定的屬性類型。
public:
override bool IsDefined(Type ^ attributeType, bool inherit);
public override bool IsDefined(Type attributeType, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean
參數
- attributeType
- Type
要測試的自訂屬性類型。
- inherit
- Boolean
此論證在此類物件中被忽略。
傳回
true 若有一個或多個 的 attributeType 實例應用於此模組;否則, false。
例外狀況
attributeType 是 null。
attributeType 不是 Type 執行時提供的物件。 例如, attributeType 是一個 TypeBuilder 物件。