The common language runtime manages memory, thread execution, code execution, code security validation, compilation, and other system services. These features are inherent in managed code that runs on the common language runtime.
As for security, the managed component is given varying degrees of trust, depending on factors including the source of the managed component, such as the Internet, the corporate network, or the local computer. This means that even in the same active application, managed components may be able to perform file access operations, registry access operations, or other features that require careful use, or they may not be able to perform these functions.
The runtime enforces code access security. For example, users can believe that an executable file embedded in a Web page can play animation or sing on the screen, but cannot access their personal data, file systems, or networks. In this way, the security features of the runtime enable the legitimate software deployed over the Internet to be particularly rich in functionality.
The runtime also enhances code reliability by implementing a rigorous type validation and code validation infrastructure called the common type System (CTS). The CTS ensures that all managed code can be self-describing. Various Microsoft and Third-party language compilers generate managed code that conforms to the CTS. This means that managed code can use other managed types and instances while strictly enforcing type fidelity and type safety.
In addition, the managed environment of the runtime eliminates many common software problems. For example, the runtime automatically handles object layouts and manages references to objects, releasing them when they are no longer in use. This automatic memory management resolves two of the most common application errors: memory leaks and invalid memory references.
The runtime also improves the productivity of developers. For example, programmers can write applications in the development language they choose, but still take full advantage of the runtime, class libraries, and components that other developers write in other languages. Any compiler vendor that chooses to target the runtime can do so. Language compilers that target the. NET Framework enable existing code written in that language to use the capabilities of the. NET Framework, which greatly eases the workload of the migration process for existing applications.
Although the runtime is designed for future software, it also supports both current and previous software. Interoperability between managed and unmanaged code enables developers to continue to use the required COM components and DLLs.
The runtime is designed to enhance performance. Although the common language runtime provides many standard Run-time library services, it never interprets managed code. A feature called Just-in-time (JIT) compilation enables all managed code to run in the native language of the system on which it executes. At the same time, the memory manager excludes the possibility of fragmented memory and increases the memory reference area to further improve performance.
Finally, the runtime can be hosted by High-performance server-side applications such as Microsoft SQL Server and Internet Information Services (IIS). This infrastructure enables you to write business logic using managed code while enjoying the advantages of the industry's best enterprise Servers that support the runtime host.