ConstructorBuilder.IsDefined(Type, Boolean) Méthode

Définition

Vérifie si le type d’attribut personnalisé spécifié est défini.

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

Paramètres

attributeType
Type

Type d’attribut personnalisé.

inherit
Boolean

Contrôle l’héritage des attributs personnalisés à partir de classes de base. Ce paramètre est ignoré.

Retours

Boolean

true si le type d’attribut personnalisé spécifié est défini ; sinon, false.

Exceptions

Cette méthode n’est pas prise en charge pour l’instant. Vous pouvez récupérer le constructeur à l’aide du GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) et appeler IsDefined(Type, Boolean) sur le ConstructorInfo retourné.

Remarques

Pour plus d’informations sur la façon de mettre en forme, consultez la spécification de métadonnées binaryAttribute .

S’applique à