TypeDelegator.GetCustomAttributes 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.
Retourne tous les attributs personnalisés définis pour ce type.
Surcharges
| Nom | Description |
|---|---|
| GetCustomAttributes(Boolean) |
Retourne tous les attributs personnalisés définis pour ce type, en spécifiant s’il faut rechercher la chaîne d’héritage du type. |
| GetCustomAttributes(Type, Boolean) |
Retourne un tableau d’attributs personnalisés identifiés par type. |
GetCustomAttributes(Boolean)
Retourne tous les attributs personnalisés définis pour ce type, en spécifiant s’il faut rechercher la chaîne d’héritage du type.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes(bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()
Paramètres
- inherit
- Boolean
Spécifie s’il faut rechercher la chaîne d’héritage de ce type pour rechercher les attributs.
Retours
Tableau d’objets contenant tous les attributs personnalisés définis pour ce type.
Exceptions
Impossible de charger un type d’attribut personnalisé.
S’applique à
GetCustomAttributes(Type, Boolean)
Retourne un tableau d’attributs personnalisés identifiés par type.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes(Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
Paramètres
- attributeType
- Type
Tableau d’attributs personnalisés identifiés par type.
- inherit
- Boolean
Spécifie s’il faut rechercher la chaîne d’héritage de ce type pour rechercher les attributs.
Retours
Tableau d’objets contenant les attributs personnalisés définis dans ce type qui correspondent au attributeType paramètre, en spécifiant s’il faut rechercher la chaîne d’héritage du type ou null si aucun attribut personnalisé n’est défini sur ce type.
Exceptions
attributeType a la valeur null.
Impossible de charger un type d’attribut personnalisé.