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

例外狀況

適用於