1.

What Is Custom Binding?

Answer»

The common language runtime supports multiple programming languages, and the binding rules of these languages differ. In the early-bound CASE, code generators can COMPLETELY control this binding. However, in late binding through reflection, binding must be controlled by customized binding. The Binder class provides custom control of member selection and invocation.

Using custom binding, you can load an assembly at run time, obtain information about TYPES in that assembly, specify the type that you want, and then invoke methods or ACCESS FIELDS or properties on that type. This technique is useful if you do not know an object's type at compile time, such as when the object type is dependent on user input.

The common language runtime supports multiple programming languages, and the binding rules of these languages differ. In the early-bound case, code generators can completely control this binding. However, in late binding through reflection, binding must be controlled by customized binding. The Binder class provides custom control of member selection and invocation.

Using custom binding, you can load an assembly at run time, obtain information about types in that assembly, specify the type that you want, and then invoke methods or access fields or properties on that type. This technique is useful if you do not know an object's type at compile time, such as when the object type is dependent on user input.



Discussion

No Comment Found