MethodBuilder.IsDefined(Type, Boolean) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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 à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour