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

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

inherit
Boolean

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

傳回

如果已定義指定的自訂屬性類型,則為 true,否則為 false

備註

針對動態方法,針對 trueinherit 指定 沒有作用。 動態方法沒有繼承鏈結。

注意

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

適用於

另請參閱