What is managed code?

Source: Internet
Author: User
What is managed code in C #?

Analysis:

ManagedCode(Managed code) is actually an intermediate language (IL) code.

After the code is compiled, the compiler compiles the code into an intermediate language (IL) instead of a machine code that can run directly on your computer.

ProgramAn assembly file encapsulates the intermediate language. A program contains all metadata describing the created methods, classes, and attributes.

The managed code runs in the Common Language Runtime Library (CLR. This Runtime Library provides multiple services for Running code. Generally, the Common Language Runtime Library can load and verify the Assembly to ensure the correctness of the intermediate language.

When some methods are called, the Common Language Runtime Library compiles the specific methods into machine codes suitable for running on local computers and caches the compiled machine codes for use in the next call. This process is instant compilation.

Note: The program is actually "hosted" in the Public Language Runtime Library. As the Assembly runs, the Common Language Runtime Library continuously provides various services, such as memory management, security management, and thread management.

Summary:

Managed code is the code executed by the Common Language Runtime Library (CLR), rather than directly executed by the operating system.

Managed code can also call the CLR Runtime library services and functions, such as GC, type check, and security support. These services and functions provide independent and unified management code application behavior.

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.