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

Spécifie s’il faut rechercher les attributs personnalisés dans la chaîne d’héritage de ce membre.

Retours

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

Exceptions

Cette méthode n’est actuellement pas prise en charge. Récupérez la méthode à l’aide GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) et appelez IsDefined(Type, Boolean) sur le retour MethodInfo.

S’applique à