Utility.GetCustomAttributes(Type, 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.
En cas de substitution dans une classe dérivée, retourne un tableau d’attributs personnalisés appliqués à ce membre et identifiés par System.Type.
public static System.Collections.Generic.IEnumerable<object> GetCustomAttributes (Type type, Type attributeType, bool inherit);
static member GetCustomAttributes : Type * Type * bool -> seq<obj>
Public Shared Function GetCustomAttributes (type As Type, attributeType As Type, inherit As Boolean) As IEnumerable(Of Object)
Paramètres
- type
- Type
Type sur lequel interroger des attributs personnalisés.
- attributeType
- Type
Type d’attribut à rechercher. Seuls les attributs qui peuvent être assignés à ce type sont retournés.
- inherit
- Boolean
true pour rechercher les attributs dans la chaîne d’héritage de ce membre ; sinon, false. Ce paramètre est ignoré pour les propriétés et les événements ; consultez la section Notes.
Retours
Un IEnumerable<T> d’attributs personnalisés appliqués à ce membre, ou un tableau avec zéro élément si aucun attribut assignable à attributeType n’a été appliqué.