This documentation is archived and is not being maintained.

Binder.SelectProperty Method

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

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

public abstract PropertyInfo SelectProperty (
	BindingFlags bindingAttr,
	PropertyInfo[] match,
	Type returnType,
	Type[] indexes,
	ParameterModifier[] modifiers
)
public abstract PropertyInfo SelectProperty (
	BindingFlags bindingAttr, 
	PropertyInfo[] match, 
	Type returnType, 
	Type[] indexes, 
	ParameterModifier[] modifiers
)
public abstract function SelectProperty (
	bindingAttr : BindingFlags, 
	match : PropertyInfo[], 
	returnType : Type, 
	indexes : Type[], 
	modifiers : ParameterModifier[]
) : PropertyInfo
Not applicable.

Parameters

bindingAttr

A bitwise combination of BindingFlags values.

match

The set of properties that are candidates for matching. For example, when a Binder object is used by System.Type.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 Type.DefaultBinder changes the order of this array.

returnType

The return value the matching property must have.

indexes

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

modifiers

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

Return Value

The matching property.

Exception typeCondition

AmbiguousMatchException

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

ArgumentException

For the default binder, match is a null reference (Nothing in Visual Basic) or an empty array.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0
Show: