共用方式為


ConstructorInfoWrapper.IsDefined(Type, Boolean) Method

Definition

Determines whether one or more attributes of the specified type or of its derived types is applied to this member.

public:
 override bool IsDefined(Type ^ attributeType, bool inherit);
public:
 override bool IsDefined(Platform::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

Parameters

attributeType
Type

The type of custom attribute to search for. The search includes derived types.

inherit
Boolean

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns

Returns Boolean.

Applies to