DynamicMethod.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

A Type 代表要搜尋的自訂屬性類型。

inherit
Boolean

true 搜尋方法的繼承鏈以尋找自訂屬性; false 只檢查目前的方法。

傳回

true若定義了指定的自訂屬性類型;否則,。 false

備註

對於動態方法,指定 trueinherit 會影響。 動態方法沒有繼承鏈。

Note

動態方法目前不支援自訂屬性。

適用於

另請參閱