Binder Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Selects a member from a list of candidates, and performs type conversion from actual argument type to formal argument type.
Assembly: mscorlib (in mscorlib.dll)
The Binder type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | BindToField | Selects a field from the given set of fields, based on the specified criteria. |
![]() | BindToMethod | Selects a method to invoke from the given set of methods, based on the supplied arguments. |
![]() | ChangeType | Changes the type of the given Object to the given Type. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ReorderArgumentArray | Upon returning from BindToMethod, restores the args argument to what it was when it came from BindToMethod. |
![]() | SelectMethod | Selects a method from the given set of methods, based on the argument type. |
![]() | SelectProperty | Selects a property from the given set of properties, based on the specified criteria. |
![]() | ToString | 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 InheritorsWhen 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.
Note: |
|---|
To run this example, see Building examples that have static TextBlock controls for Windows Phone 8. |


Note: