Relationships and differences between managed and non-managed services (repost)

Source: Internet
Author: User

(Post)

The key is to understand CLR (runtime in public languages)
. Net Framework is composed of two independent and related parts: Clr and class library. CLR is the service it provides for us. Class Library is the function it implements .. most of net's features-garbage collection, version control, thread management, and so on, all use the services provided by CLR.
When you are. when the Net Framework compiles the source code, the target code is not a machine instruction that the CPU can recognize, but a kind of code called "Microsoft intermediate language (msil, or IL for short). CLR provides a real-time compiler for compiling il code into local machine code. in this way, the CLR can make the code portable, because. NET application source code must be compiled into il code, which can run on any platform that provides CLR services. from the perspective of CLR, all languages are equal, as long as there is a compiler that can generate il code, which ensures the interoperability of various languages.
The code for writing and using the CLR service for CLR is called "managed code", and the code that does not use the CLR Service (that is, the code you have been writing for many years) it is called "unmanaged code ".
Discussed in C ++ in.. Net hosting environment, because C ++ is not. therefore, Microsoft needs to expand C ++ to introduce the concept of "managed extension, it allows us to use it in C ++ projects.. NET Framework. If you have the following development needs, you must use managed extensions:
1. Porting existing C ++ code to the hosting environment
2. Access the. NET Framework class in C ++ code
3. Access the existing C ++ code through the. NET language

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.