Relationship between CLR, CLI, CTS, and CLS

Source: Internet
Author: User

· CLR (Common Language Runtime Library) is a CLI implementation that includes the. NET runtime engine and a class library compliant with CLI. Almost all. Net files we developedProgramAll are implemented based on CLR class libraries and run on the running engine provided by CLR.

· CLI (Basic Public Language) is a language and data format specification submitted by Microsoft to ECMA. CLR is the only implementation version of the Basic Public language so far. CLI includes the common type System (CTS), common intermediate language (CER), bottom file format, and metadata format.

· CTS (a common type system) defines a language specification that can run on CLR. Although many languages do not comply with the CTS specification, many languages can compile programs that can run on CLR by enhancing the compiler and changing additional language specifications. Compiling a program written in a language can run on the CLR. It does not mean that the language fully complies with the CTS specifications. For example, the C ++ language keeps the section that does not comply with the CTS specification and does not conform to the CTS specification during compilation.CodeCompile the code into the original code instead of the intermediate code.

· CLS is a subset of CTS, which defines the minimum specification required for the language of the program to be written on the. NET platform. Because. Net allows programs written in different languages to run together, CLS specifications are developed to avoid errors caused by different language features. In. NET Framework, almost all (but not all) classes are CLS compatible. In the msdn documentation, incompatible classes and methods are particularly marked as incompatible, such as the uint32 structure in the system namespace. Uint32 indicates a 32-bit unsigned integer. Not all languages (such as Visual Basic. Net or J #) Support unsigned data types, which are incompatible with Cls.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.