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 pas prise en charge pour l’instant. Récupérez la méthode à l’aide de GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) et appelez IsDefined(Type, Boolean) sur le MethodInfo retourné.

S’applique à