Share via


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

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

傳回

如果一或多個 attributeType 的執行個體套用至這個成員,則為 true,否則為 false

備註

此方法適用於從 Unmanaged 程式代碼存取 Managed 類別,不應從 Managed 程式代碼呼叫。

成員 IsDefined 會指出的一或多個實例 attributeType 是否套用至這個成員。

適用於