Common Language Runtime
|This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. Please improve this article by introducing more precise citations where appropriate. (July 2009)|
The Common Language Runtime (CLR) is a core component of Microsoft's .NET initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which defines an execution environment for program code. In the CLR code is expressed in a form of bytecode called the Common Intermediate Language (CIL, previously known as MSIL -- Microsoft Intermediate Language).
Developers using the CLR write code in a language such as C# or VB.NET. At compile time, a .NET compiler converts such code into CIL code. At runtime, the CLR's just-in-time compiler converts the CIL code into code native to the operating system. Alternatively, the CIL code can be compiled to native code in a separate step prior to runtime. This speeds up all later runs of the software as the CIL-to-native compilation is no longer necessary.
Although some other implementations of the Common Language Infrastructure run on non-Windows operating systems, Microsoft's implementation runs only on Microsoft Windows operating systems.
The CLR allows programmers to ignore many details of the specific CPU that will execute the program. It also provides other important services, including the following:
- Memory management
- Thread management
- Exception handling
- Garbage collection
- Common Type System
- Managed code
- Virtual machine
- Overview (Microsoft MSDN)
- "Standard ECMA-335, Common Language Infrastructure (CLI)". ECMA International. http://www.ecma-international.org/publications/standards/Ecma-335.htm. Retrieved August 17 2007.