DynamicMethod.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
參數
- inherit
- Boolean
true 表示要搜尋方法的繼承鏈結以尋找自訂屬性;false 表示只會檢查目前的方法。
傳回
如果已定義指定的自訂屬性類型,則為 true,否則為 false。
備註
針對動態方法,針對 trueinherit 指定 沒有作用。 動態方法沒有繼承鏈結。
注意
動態方法目前不支援自定義屬性。