Share via


ParameterDescriptor.GetCustomAttributes Méthode

Définition

Surcharges

GetCustomAttributes(Boolean)

Retourne un tableau des attributs personnalisés définis pour ce membre, à l'exception des attributs nommés.

GetCustomAttributes(Type, Boolean)

Retourne un tableau d’attributs personnalisés qui sont définis pour ce membre, identifiés par type.

GetCustomAttributes(Boolean)

Retourne un tableau des attributs personnalisés définis pour ce membre, à l'exception des attributs nommés.

public virtual object[] GetCustomAttributes (bool inherit);
abstract member GetCustomAttributes : bool -> obj[]
override this.GetCustomAttributes : bool -> obj[]
Public Overridable Function GetCustomAttributes (inherit As Boolean) As Object()

Paramètres

inherit
Boolean

true pour rechercher l’attribut personnalisé hérité dans la chaîne hiérarchique ; sinon, false.

Retours

Object[]

Tableau d'attributs personnalisés ou tableau vide s'il n'existe aucun attribut personnalisé.

Implémente

Exceptions

Le type d’attribut personnalisé ne peut pas être chargé.

Plusieurs attributs de type attributeType sont définis pour ce membre.

S’applique à

GetCustomAttributes(Type, Boolean)

Retourne un tableau d’attributs personnalisés qui sont définis pour ce membre, identifiés par type.

public virtual object[] GetCustomAttributes (Type attributeType, bool inherit);
abstract member GetCustomAttributes : Type * bool -> obj[]
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overridable Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()

Paramètres

attributeType
Type

Type des attributs personnalisés.

inherit
Boolean

true pour rechercher l’attribut personnalisé hérité dans la chaîne hiérarchique ; sinon, false.

Retours

Object[]

Tableau d'attributs personnalisés ou tableau vide s'il n'existe aucun attribut personnalisé.

Implémente

Exceptions

Le type d’attribut personnalisé ne peut pas être chargé.

Plusieurs attributs de type attributeType sont définis pour ce membre.

Le paramètre attributeType est null.

S’applique à