Binder Class


Selects a member from a list of candidates, and performs type conversion from actual argument type to formal argument type.

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


type Binder = class end


Initializes a new instance of the Binder class.

System_CAPS_pubmethodBindToField(BindingFlags, FieldInfo[], Object, CultureInfo)

Selects a field from the given set of fields, based on the specified criteria.

System_CAPS_pubmethodBindToMethod(BindingFlags, MethodBase[], Object[], ParameterModifier[], CultureInfo, String[], Object)

Selects a method to invoke from the given set of methods, based on the supplied arguments.

System_CAPS_pubmethodChangeType(Object, Type, CultureInfo)

Changes the type of the given Object to the given Type.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodReorderArgumentArray(Object[], Object)

Upon returning from BindToMethod, restores the args argument to what it was when it came from BindToMethod.

System_CAPS_pubmethodSelectMethod(BindingFlags, MethodBase[], Type[], ParameterModifier[])

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

System_CAPS_pubmethodSelectProperty(BindingFlags, PropertyInfo[], Type, Type[], ParameterModifier[])

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


Returns a string that represents the current object.(Inherited from Object.)

Implementations of the Binder class are used by methods such as Type.InvokeMember, which selects from a set of possible members to execute, based on a set of parameter types and argument values; Type.GetMethod, which selects a method based on parameter types; and so on.

A default implementation of the Binder class is provided by the Type.DefaultBinder property.

Notes to Inheritors:

When you inherit from Binder, you must override the following members: BindToMethod, BindToField, ReorderArgumentArray, SelectMethod, SelectProperty, and ChangeType.

The following example implements and demonstrates all members of the Binder class. The private method CanConvertFrom finds compatible types for a given type.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top