". NET Framework Foundation"--CLR, BCL, DLLs, Assembly

Source: Internet
Author: User

The. NET framework is a new managed code programming model for Windows that contains the CLR (Common Language Runtime) and the BCL (Base CLass Library) composition.


  First, the CLR


1. What is the CLR?

Common Language Runtime, the common language runtime, and the JVM(Java Virtual Machine,java VMS implement the platform-agnostic nature of Java, which masks specific information about the platform, Just build the target code that runs on the Java Virtual machine and it can be run on any platform. Once compiled, run everywhere) is the same as the operating environment.


2. What to do?

The CLR is primarily responsible for resource management, such as memory allocation, garbage collection processing, and the necessary separation between the application and the underlying operating system.

3, how to manage the code

(1) Select compiler


(2) Compile managed code (code that runs the program under CLR monitoring) to MSIL(Microsoft intermediate Language Microsoft Intermediate Language). Generate metadata (Metadata, data describing data, main description data type definition, code reference, etc.) together in a portable executable PE(portable executable) while generating MSIL file.


(3) using the CLR's own JIT compiler to compile MSIL into machine language, JIT can detect the security of code.


(4) Executes the code, only the first call to compile.


4. Advantages

The most important features of the CLR are: cross-language, which means that classes written in vb.net can be inherited by C # classes.


 II. BCL


1, what is it?


The base Class library, the base class libraries, is a common programming framework and is one of the specifications of the CLI(Common Language Infrastructure Common Language Infrastructure) .


2, what is the use?

(1) To provide the necessary items for the development of various solutions and speed up the development of the solutions;

(2) The various solution models are consistent;

(3) in. NET platform, the development team can use different languages.


3. Composition

The BCL Base Category library contains database categories (ADO), Windows categories, XML categories, graphics category (GDI +) system categories, and ASP.


Third, DLL
1, what is it?

The dynamic link library, dynamically linked libraries, also known as components, CLR and BCL, are composed of components. When we were in. EXE application, the corresponding DLL file will be called, an application is divided into a separate dynamic link library, can have multiple DLL files, a DLL file can also be shared by multiple applications.


2, the role of DLL files

If all the required files are placed in the application, the application will be large, the disk space will be large, and all the code will be recompiled when rebuilt. And with the DLL file is not the same, you can create a separate DLL file, only when the call, it will occupy memory space.


Iv. Assembly


1, what is it?

The Assembly assembly, obtained by the compiler, is used by the CLR to further compile the intermediate product MSIL, which is generally performed. DLL, or. EXE format, you must rely on the CLR for smooth execution. It is a combination of one or more managed modules and a resource file that contains the executable application. EXE and the dynamic link library. DLL, which is part of the. NET Framework.


2. Components


(1) Self-description of the assembly: metadata and the assembly manifest.

(2) Implement these types of MSIL code

(3) resource set (for example: bitmap).


3. Static assembly VS Dynamic Assembly


Static assemblies are stored in portable executable PE files, and dynamic assemblies run directly from memory and are not stored on disk until they are executed.


v. Summary


Just saw a episode of vb.net video, some do not understand, on the search, check, found that the knowledge is connected. assembly contains. exe and. dll files, and. dll is also part of the CLR and BCL: NET is also made up of a number of. dlls. A little bit more about the. NET Framework




". NET Framework Foundation"--CLR, BCL, DLLs, Assembly

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.