.net Overview

.Net Framework CLR is the core of
the core CLR is the CTS and CLS change any programming language if you want to execute on the .NET CLR it is necessary to provide a compiler
will be compiled into a second language program metadata .net CLR know and IL comply with the provisions of CTS

CTS is a common type system
CLS is common language definition
CLR is the common language runtime

CLR execution model
1. The source code (vb cs) compiled into managed code blocks with an intermediate language managed code block of metadata and
2. The combined stresses managed code also called into an assembly component assembly contains a module called the list of
recorded information including resource files that make up the program and modules, and the need to refer to their own information
3. load the common language runtime
code is executed assembly 4
5 generation native code

CLI Common Language Infrastructure
CLI is an open specification
CLR is the realization of one such norms

BCL Base Class Library
BCL is a common programming framework called the base class library developers can use it in all languages is one of the CLI specification includes performing network operations to perform I / O operations and safety management text manipulation XML database operations and event operations provide basic support interactive logging, tracking, and a number of diagnostic procedures royalty managed code to call the dynamic code to create a relatively small size such as the framework for all

FCL Framework Class Library
FCL provides the programming framework for large-size angel for most of the implementation framework FCL different application design references the BCL We often say that development framework such as: ASP.NeT MVC WCF and WPF, and so provide for different levels of programming framework


Managed code is compiled by the VB and C # compiler code is managed code running in the common language runtime
unmanaged code is to run the code outside the common language runtime environment by the operating system directly unmanaged code must provide their own garbage collection type checking security support services

Difference:
1 is an intermediate language managed code running on the CLR
unmanaged code is compiled to machine code running on the machine
2 managed code platform-independent and language better compatibility between the different language platform
unmanaged code since platform and language
3 CLR managed code can enjoy the services provided do not need to complete these operations
unmanaged code required to provide their own security monitoring garbage collection and other operations
4.net have a lot of unmanaged resources such as database connections StreamWriter Timer

unsaft can be used to modify the class. Class member functions of global variables tired but can not be used to modify local variables within a class member function in the common language runtime, refer to unsafe code can not be verified code in C # unsafe code is not necessarily dangerous, but your safety of the code can not be verified by the CLR

What is the GC
garbage collection far as memory here in terms of
all the objects in the application works on the ergodic Heap dynamically allocated by recognizing whether they are referenced to determine which objects have died of what still needs to be used is no longer referenced application the object is the target dead and so-called garbage to be recycled

First GC can not release all the resources it can not automatically releases the unmanaged resources
second is not real-time, this will result in bottlenecks and uncertainties on system performance so with IDisposable interface interface defines the Dispose method This method is used for programmers to display calls to release unmanaged resources

Metadata is a swimsuit binary information stored in the common language runtime executable files or PE portable program stored in the memory will be described

Described types of metadata stored in the attribute information described assembly

 

Guess you like

Origin www.cnblogs.com/-zillb/p/11139532.html