Meta-Programming

The ability to dynamically create new types at runtime is known as meta-programming. The CLR provides this capability through Reflection.Emit. Creating dynamic types is a fundamental facility in the remoting services. For example, COM and CORBA can produce code for proxy objects at IDL compile time. This code is then linked with the client and server programs. With the CLR's remoting services, the runtime environment dynamically creates proxy objects whenever the need arises. This approach eliminates the problem of locating and loading the DLL that contains the proxy code at runtime.

Figure 3.7 shows some of the classes involved in providing meta-programming facilities. The diagram is similar to Figure 3.1, which depicts the ...

Get Programming in the .NET Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.