_MethodBase.IsDefined(Type, Boolean) 方法

定義

提供 COM 物件對該方法的版本無關存取 IsDefined(Type, Boolean) 權。

public:
 bool IsDefined(Type ^ attributeType, bool inherit);
public bool IsDefined(Type attributeType, bool inherit);
abstract member IsDefined : Type * bool -> bool
Public Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

參數

attributeType
Type

Type自訂屬性套用的物件。

inherit
Boolean

true搜尋該成員的繼承鏈以尋找屬性;否則,。 false

傳回

true 若該參數的一個或多個實例 attributeType 被套用於該成員;否則, false

備註

此方法用於存取非受管理程式碼中的受管理類別,不應從受管理程式碼呼叫。

成員 IsDefined 會顯示該參數是否被套用到一個或多個實例 attributeType

適用於