MethodBuilder.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
例外狀況
此方法目前尚未支援。 用 取得 GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) 方法,並呼叫 IsDefined(Type, Boolean) 返回 MethodInfo的 。