C # The. NET Operating Mechanism of the newest Learning Series-What is managed code in. NET? (3)

Source: Internet
Author: User

Reading directory

I. managed code

I. managed code

.The managed code is based on. NET metadata format code, run on... NET platform, such as entrusting these functions. NET, so it is called managed code

.Code executed by the public Language Runtime Library environment, rather than the Code directly executed by the operating system, managed code applications can obtain the service of the Common Language Runtime Library CLR, such as automatic garbage collection, runtime Library type check, security support, and other services. These services help provide unified managed code application behavior independent of platform and language.

.Managed code does not have to worry about memory allocation, type security, and execution of environment management goals when running in public languages. C # Or VB is used. the code written in these languages is called managed code. managed code is always compiled into an intermediate language (MSIL)
.These compilers use the. NET Framework to compile managed code into an intermediate language and generate necessary metadata and information.

.The managed code is Visual Basic. NET and C # compiler compiled code. The Compiler compiles the code into an intermediate language (MSIL for short, IL), instead of machine code that can be run directly on your computer, an intermediate language is encapsulated in an assembly file. A program contains all the metadata describing the classes, methods, and attributes you create (such as security requirements, this Assembly is. NET World, you can copy this Assembly to another server to deploy it. Generally, this copy operation is the only operation in the deployment process, the managed code runs in the Common Language Runtime Library (CLR. This Runtime Library provides various services for your running code. Generally, it loads and verifies the Assembly to ensure the correctness of the intermediate language. When some methods are called, the Runtime Library compiles the specific method into a machine code suitable for running on the local computer, and then caches the compiled machine code for the next call (this is instant compilation)

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.