System.Reflection.Binder.SelectMethod Method

Selects a method from the given set of methods, based on the argument type.

Syntax

public abstract MethodBase SelectMethod (BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[] modifiers)

Parameters

bindingAttr
A bitwise combination of System.Reflection.BindingFlags values.
match
The set of methods that are candidates for matching. For example, when a System.Reflection.Binder object is used by erload:System.Type.InvokeMember, this parameter specifies the set of methods 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.
types
The parameter types used to locate a matching method.
modifiers
An array of parameter modifiers that enable binding to work with parameter signatures in which the types have been modified.

Returns

The matching method, if found; otherwise, null.

Remarks

This method should return null if no method matches the criteria. This method controls the selection provided by the GetConstructor and GetMethod methods on Type.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0