Reviewing the Binder ClassThe Binder class is an abstract class that you must inherit from to use. Binders are used to perform type conversions. The InvokeMember method of Type objects can accept a Binder object that describes how to perform type conversions between the types of arguments passed to InvokeMember and the actual types needed by the member being invoked. To create a binder you will need to inherit from System.Reflection.Binder and override BindToMethod , BindToField , SelectMethod , SelectProperty , and ChangeType .
In addition to being used to bind methods for dynamically invoking members , binders are used in other contexts. ASP.NET uses binding to bind the results of functions and properties to controls on a Web page. (Refer to the help documentation on the Binder class for a long example of a custom binder.) |