CLR: Common Language Runtime
- It provides enviornment in which the programs are executed
- It is a runtime that is usable by different and varied programming languages
- Infact, at runtime, the CLR has no idea which programming language developer used for source code
- This runtime is analogous to JVM i.e Java Virtual Machine in J2EE
- CLR performs the following activities:
- Activates objects
- Performs security checks on them
- Lays them out in memory, executes them
MSIL: Microsoft Intermediate Language
- In .NET, programs are not compiled into executable (.exe) files. They are first compiled into MSIL which is then executed by CLR
- The CLR deals only with IL.Its totally unaware of the programming language used for IL generation
- When the application is run, the IL file is complied to Machine Code which is then executed by machine processor
- This run time compilation is called as Just-In-Time (JIT) compilation
Managed Modules
- It is the code targeted to the CLR
- CLR manages its lifetime and execution
- Contains headers and IL code
- End users must have CLR installed on their machines to execute managed modules
Assembly
- An assembly is the collection of one or more files grouped together to form a logical unit.
- Fundamental unit of security, versioning and deployment in the .NET framework
- CLR is incapable of using managed modules directly
- Can be a single file or multifile
- All files of multifile assembly must reside in the same directory
- It glues together managed modules written in different languages with various resource files