CLR: Common Language Runtime In C#
The .NET Framework has two main components: the common language runtime and the .NET Framework class library.
Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services. There is one Most Profficient book by which you learn about CLR in C# enivronment.CLR via C#.net 2005
The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing
The runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.
The Very Basic Architecture of CLR is :
Source Code in specific Languages like (C#, VB,ASP) first goes to IL(Intermediate language) . And then this process first comes in Compile time and then after IL converts this Code in Native code using CLR (Common Language Runtime) in runtime.
Languages{C#, VB, Other Languages} -{C# compiler, VB Compiler}- MSIL Code -{CLR}- Native Code
IL
All .NET source code is compiled to IL. This IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In- Time (JIT) compiler.
Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft® ActiveX® controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage.