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

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

傳回

如果一個或多個 attributeType 的執行個體已套用至這個模組,則為 true,否則為 false

例外狀況

attributeTypenull

attributeType 不是執行階段所提供的 Type 物件。 例如,attributeTypeTypeBuilder 物件。

適用於