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

自訂屬性類型。

inherit
Boolean

指定是否要搜尋這個成員的繼承鏈結以尋找自訂屬性。

傳回

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

例外狀況

適用於