Cts,cls,clr

Source: Internet
Author: User

1) CTS Universal type System (Common type systems)

The CTS not only implements the variable compatibility type of COM, but also defines the type extension by means of user-defined types.
Any to. NET platform as the target language must establish a mapping between its data type and the type of the CTS.
All. NET language to share this type of system, to achieve seamless interoperability between them. The scheme also provides the inheritance between languages.
For example, a user can derive a class written by C # in vb.net. We can consider the CTS to be the superset (union) of all. NET languages,
And in accordance with the CTS of a variety of different languages, in fact, is only the CTS subset (intersection). The programs written in these languages,
If you want to have the best possible compatibility to invoke (Invoke) or inherit from each other, these languages need to get a common subset,
There is a common code of compliance, which is CLS.

2) CLS Common Language Specification (Common Language specification)

Obviously, the difference between programming languages is not just the type. For example, some languages support multiple inheritance, some languages support unsigned data types,
Some languages support operator overloading. Users should be aware of this, therefore. NET by defining the Common Language Specification (Cls:common Language specification),
The interoperability issues raised by these differences are limited. The CLS has developed a minimum feature that must be supported by a language that targets the. NET platform.
As well as that language with the other. NET language to achieve interoperability between the It's important to recognize this,
The characteristic problem discussed here is not just a simple grammatical distinction between languages. For example, the CLS does not care about what keyword is used by a language to implement inheritance,
Just care how the language supports inheritance. The CLS is a subset of the CTS. This means that a language feature may conform to the CTS standard, but is beyond the scope of the CLS.
For example, C # supports unsigned numeric types, which can pass the CTS test, but the CLS only recognizes symbolic numeric types.
Therefore, if a user uses a C # unsigned type in a component, it may not be designed with languages that do not use unsigned types, such as vb.net. NET components for interoperability.



3) CLR Common language Runtime (Common Language Runtime)

To put it simply, the CLR is the implementation of the CTS, which means that the CLR is the application's execution engine and a fully functional class library, which is implemented in strict accordance with the CTS specification.
As a program execution engine, the CLR is responsible for securely loading and running user program code, including garbage collection and security checks on unused objects.
Code that runs under CLR monitoring, called Managed code (managed).

Reference: ". NET distributed Programming--c# chapter "

Cts,cls,clr

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.