Emitting Attributes to IL
You can use Reflection to emit IL directly. (Refer to Chapter 4 for more information on Reflection in general.) IL is an intermediate form similar to Java byte code that is created between the compile and link processes. By emitting IL the CLR has one more opportunity to perform security checks, and the number of compilers that have to be created is dramatically reduced. For example, if Borland implements a .NET compiler for Delphi, Borland has to implement only one compiler to emit IL. Then any existing linker can be used to write the emitted IL to a particular platform. Without IL, vendors would have to write a compiler for each language and operating system. With IL, each vendor needs to compile only to IL, and then ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access