_ConstructorInfo.IsDefined(Type, Boolean) _ConstructorInfo.IsDefined(Type, Boolean) _ConstructorInfo.IsDefined(Type, Boolean) _ConstructorInfo.IsDefined(Type, Boolean) Method

定义

为 COM 对象提供对 IsDefined(Type, Boolean) 成员的版本无关的访问。Provides COM objects with version-independent access to the IsDefined(Type, Boolean) member.

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 Type Type

将应用自定义属性的 Type 对象。The Type object to which the custom attributes are applied.

inherit
Boolean Boolean Boolean Boolean

指定是否搜索此成员的继承链以查找属性。Specifies whether to search this member's inheritance chain to find the attributes.

返回

如果此成员应用了一个或多个 attributeType 实例,则为 true;否则为 falsetrue if one or more instances of attributeType is applied to this member; otherwise false.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

IsDefined成员指示是否的一个或多个实例attributeType应用于此成员。The IsDefined member indicates whether one or more instances of attributeType is applied to this member.

适用于