Differences between hosting and non-hosting

Source: Internet
Author: User
Tags hosting

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 Libraries are most of its features. Net-garbage collection, version control, thread management, and so on, all use the services provided by CLR.

When you are a. net
When the framework compiles the source code, the target code is not a machine instruction that the CPU can recognize, but a new language called "Microsoft intermediate language (msil, or IL code for short )".
Statement. 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
Il code, which can run on any platform that provides CLR services. from the CLR perspective, all languages are equal, as long as there is a compiler that can generate il code, this is
It 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..
It allows us to use. NET Framework in C ++ projects. 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.