Applying Attributes
In .NET code is compiled to an assembly. The assembly contains IL code and metadata. IL is a state between source code and machine language. By emitting IL the CLR has one more opportunity to examine code before it is just-in-time compiled (JITted) and to compare the security permissions requested against those granted. Also, the total number of compilers and JITters is dramatically reduced (see the note). In addition to IL, .NET assemblies contain metadata. Metadata allows assemblies to carry additional information around that uniquely identifies the assembly. Metadata is added to assemblies via attributes.
NOTEA second reason to compile code to a byte code form (IL is analogous to Java byte code) is to reduce the number ... |
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