Επεξεργασία

Κοινή χρήση μέσω


Binder.SelectProperty Method

Definition

Selects a property from the given set of properties, based on the specified criteria.

public:
 abstract System::Reflection::PropertyInfo ^ SelectProperty(System::Reflection::BindingFlags bindingAttr, cli::array <System::Reflection::PropertyInfo ^> ^ match, Type ^ returnType, cli::array <Type ^> ^ indexes, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public abstract System.Reflection.PropertyInfo? SelectProperty (System.Reflection.BindingFlags bindingAttr, System.Reflection.PropertyInfo[] match, Type? returnType, Type[]? indexes, System.Reflection.ParameterModifier[]? modifiers);
public abstract System.Reflection.PropertyInfo SelectProperty (System.Reflection.BindingFlags bindingAttr, System.Reflection.PropertyInfo[] match, Type returnType, Type[] indexes, System.Reflection.ParameterModifier[] modifiers);
abstract member SelectProperty : System.Reflection.BindingFlags * System.Reflection.PropertyInfo[] * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public MustOverride Function SelectProperty (bindingAttr As BindingFlags, match As PropertyInfo(), returnType As Type, indexes As Type(), modifiers As ParameterModifier()) As PropertyInfo

Parameters

bindingAttr
BindingFlags

A bitwise combination of BindingFlags values.

match
PropertyInfo[]

The set of properties that are candidates for matching. For example, when a Binder object is used by InvokeMember, this parameter specifies the set of properties that reflection has determined to be possible matches, typically because they have the correct member name. The default implementation provided by DefaultBinder changes the order of this array.

returnType
Type

The return value the matching property must have.

indexes
Type[]

The index types of the property being searched for. Used for index properties such as the indexer for a class.

modifiers
ParameterModifier[]

An array of parameter modifiers that enable binding to work with parameter signatures in which the types have been modified.

Returns

The matching property.

Exceptions

For the default binder, match contains multiple properties that are equally good matches for returnType and indexes.

For the default binder, match is null or an empty array.

Remarks

This method controls the selection provided by the GetProperty method on Type.

Applies to

See also