Fast run time emitting with dynamic methods in .NET

It was a long time since, I have blogged. Nevertheless, I did not loose the enthusiasm to share the interesting stuff that I face.
As component software developer, you should know how to access the properties of data source, when you create bound able controls (such as list control, combo box control or even grid control).
The performance has always been a issue due to the fact that the control should work with any type of data source (ex. DataSet, DataTable or Entity Objects).
Such requirements cause usage of reflection to access all properties of unknown object type. Therefore, you should use the PropertyInfo or PropertyDescriptor classes.
The disadvantage of the reflection has been always the performance. However, there is good alterative that can give satisfactory speed and
unlimited power of the reflection. The Dynamic Methods provide lightweight code generation and execution of method at run-time via delegates.

Dynamic methods expand the functionality of the types in the System.Reflection.Emit namespace in several ways:

They have less overhead, because there is no need to generate dynamic assemblies, modules, and types to contain the methods.

In long-running applications, they provide better resource utilization because the memory used by method bodies can be reclaimed when the method is no longer needed.

Given sufficient security permissions, they provide the ability to associate code with an existing assembly or type, and that code can have the same visibility as internal types or private members.

Given sufficient security permissions, they allow code to skip just-in-time (JIT) visibility checks and access the private and protected data of objects.

Before you define the method body, you should declare the delegate types that you should use to access the properties of the unknown type: