The common language runtime provides and manages several services at the time an application is executed. These services include enforcing security, and managing memory, processes, threads, and language integration. Language integration enables full integration of components and XML Web services, regardless of the programming language used. Microsoft provides four .NET programming languages, which are discussed in more detail below; however, a large number of non-Microsoft languages are also available for building .NET applications.
Most Windows executable programs (.exe) use unmanaged code, which makes no provision for security or memory management. Program code executing under the common language runtime is referred to as managed code, because it relies on the common language runtime to perform many low-level tasks such as memory management. Using managed code can provide a higher level of reliability and security than unmanaged code. The following figure shows a conceptual architecture of the common language runtime components.
Common language runtime components
To bridge the gap between managed and unmanaged code, and to take advantage of the enormous amount of conventional Windows code available to developers, common language runtime enables interoperability. For example, common language runtime enables managed code to call functions defined in unmanaged code.
Note Applications that use such mixed code bases will not have the reliability and security benefits of pure managed code applications.
Common language runtime also has another important function as a virtual computer in addition to being a runtime system. Managed code applications are not compiled into executables in the same way as conventional Windows applications. Rather, they are distributed in an intermediate language called the Microsoft Intermediate Language, or MSIL. The common language runtime completes the compiling either when the application is installed or the first time the application runs. This operation is called "just in time compilation."
At the time of this writing, common language runtime is included with Visual Studio .NET and will ship as part of the Microsoft .NET Server products.