IReflect.GetProperty Méthode

Définition

Récupère un objet PropertyInfo correspondant à une propriété spécifiée.

Surcharges

GetProperty(String, BindingFlags)

Récupère un objet PropertyInfo correspondant à une propriété spécifiée avec les contraintes de recherche données.

GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

Récupère un objet PropertyInfo qui correspond à une propriété spécifiée avec les contraintes de recherche données.

GetProperty(String, BindingFlags)

Récupère un objet PropertyInfo correspondant à une propriété spécifiée avec les contraintes de recherche données.

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.PropertyInfo? GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo

Paramètres

name
String

Nom de la propriété à rechercher.

bindingAttr
BindingFlags

Attributs de liaison utilisés pour contrôler la recherche.

Retours

PropertyInfo

Objet PropertyInfo de la propriété trouvée correspondant aux contraintes de recherche spécifiées dans bindingAttr ou null si la propriété est introuvable.

Exceptions

L'objet implémente plusieurs champs du même nom.

Voir aussi

S’applique à

GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

Récupère un objet PropertyInfo qui correspond à une propriété spécifiée avec les contraintes de recherche données.

public:
 System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.PropertyInfo? GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[] types, System.Reflection.ParameterModifier[]? modifiers);
public System.Reflection.PropertyInfo GetProperty (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetProperty : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo

Paramètres

name
String

Nom du membre à rechercher.

bindingAttr
BindingFlags

Attribut de liaison utilisé pour contrôler la recherche.

binder
Binder

Objet qui implémente Binder, contenant les propriétés associées à cette méthode.

returnType
Type

Type de la propriété.

types
Type[]

Tableau utilisé pour effectuer une sélection parmi les méthodes surchargées du même nom.

modifiers
ParameterModifier[]

Tableau utilisé pour sélectionner les modificateurs de paramètres.

Retours

PropertyInfo

Objet PropertyInfo de la propriété trouvée si une propriété dotée du nom spécifié a été identifiée dans cet objet réflexion, ou null si la propriété est introuvable.

Remarques

Cette méthode récupère un PropertyInfo objet correspondant à une propriété spécifiée sous des contraintes de recherche spécifiées. Un tableau de types est utilisé pour choisir parmi les méthodes surchargées.

Voir aussi

S’applique à