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 ...

Get Visual Basic® .NET Power Coding 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.