ModuleBuilder.IsDefined(Type, Boolean) 方法

定義

回傳一個值,表示該模組是否已套用指定的屬性類型。

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

例外狀況

attributeTypenull

attributeType 不是 Type 執行時提供的物件。 例如, attributeType 是一個 TypeBuilder 物件。

適用於