Chapter 5. Reflection and Dynamic Programming

The principles of Reflection in computer science are defined by Wikipedia as:

The ability of a computer program to examine, introspect, and modify its own structure and behavior.

The internal structure of the .NET assemblies we saw in the first chapter allows us to load and invoke types embedded inside our own or foreign assemblies at runtime with a technique called dynamic invocation.

Moreover, classes related to CodeDOM and Reflection.Emit namespaces permit code generation at runtime, either in C# or other languages, including Intermediate Language (IL).

However, beyond the .NET-to-NET dialogs, we can use Interoperability to manipulate applications built in other non-NET programming languages. Actually, ...

Get Mastering C# and .NET Framework 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.