ConstructorBuilder.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若定義了指定的自訂屬性類型;否則,。 false
例外狀況
此方法目前尚未支援。 你可以用 來 GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) 檢索構造子,並呼叫 IsDefined(Type, Boolean) 返回 ConstructorInfo的 。
備註
有關格式化的 binaryAttribute詳細說明,請參閱元資料規範。