Foundation of theory of the second chapter – public language runs an environment
Since you had had the impression with overall C# ,The full view that I also think to let you understand NGWS Runtime.When C# relies on what offer by NGWS to move;Because of this,How to when be necessary to know to move, work,And its backside place accumulate contained concept.
So,Branch of this one regulation is two parts — they are all concepts and use base.Although the content of two parts has some of jackknife,But it conduces to the concept that deepens understanding to learning.
2.1NGWS Runtime
The environment when NGWS and NGWS Runtime offerred a kind to move for you.This management when moving implements code,Provided the service that makes process designing easier.Want you only compile implement when support moves this kind,The benefit in the executive environment that you can get government from this kind.
You guess C# is compiled implement supportive NGWS Runtime is very correct,But not only it supports NGWS Runtime,VB and C++ also support.The code that when these move for support, establishs calls ” to suffer tubal code “(managed Code) .The applied process that is you below from the benefit that gets over there NGWS Runtime:
Alternate language is compositive (adopt universal language standard)
Automatic memory manages (rubbish is collected)Alternate language is unusual processing (unified spread out)
Enhance security (include type security)
Version supports (terminator of “DLL Tartarean ” )
Package simplifies interactively mode
Because NGWS Runtime wanted to offer all these advantage,Compile implement must yuan of file and code getting a pipe is given out together.Yuan the type in file description code,It and your code is put together (as similar as PE—PE is alterable an executive file)
No less than you see from place of function of language of a lot of kinds of across,NGWS Runtime basically is become alternate much surprise about high collect programming language (Tight Integration Across Multiple Different Programming Languages) .This kind of support can be achieved allow you to give a C# from derive of object of a VB kind degree (can give out at the back of me the implied meaning that should discuss) .
A function that C# programmer will like is,They need not worry about memory management, need not worry about notorious memory leak that is to say.NGWS Runtime provided memory management,End when object and variable lifetime (be cited no longer) when,Rubbish is collected implement release them.I like this function really,An anxiety that because be in,the memory management in COM is me all the time.
Should encourage configuration process of an administrative application or package.Because be in charge of manage application process to contain metadata document,NGWS Runtime can use these information,All sorts of regulation version that want in order to ensure your applied process has it.The clear result that produces is,Because your code is done not have mutual the dependence between,Very few likelihood appears interrupt.
This chapter the rest of coming for two parts cent,Each respects of each part discussion NGWS Runtime,Till till your C# application the program can be carried out.
1, intermediate language (Intermediate Language,Abbreviate IL) and metadata
2, compile immediately implement (Just-in-time Compliers, abbreviation JITers)
The language is mixed amongł.1.1 metadata
Compile by C# implement generated code getting a pipe is not primitive code,But it is intermediate language (IL) code.The gets a canal to carry out a process entry that oneself of code of this kind of IL became NGWS Runtime.The advantage with IL clear code depends on it is CPU those who have nothing to do,This also is meant,One when you should go up with target machine is compiled implement ability changes IL code into primitive code.
Although IL code by compile implement generation,But it is not to compile implement the only thing when carrying supply to move.Compile implement the metadata that same generation concerns your code,More things that your code concerns when it tells to move,For example the autograph of all sorts of the definition of all sorts of types, type members and other data.Basically,Metadata is the type library, information that registers watch content and other to be used at COM.Nevertheless,Metadata still incorporates together with executive code directly,Do not lie the position of segregation.
IL and metadata are deposited at expanding in the file of PE format (PE format is used at.exe and.dll file) .When file of such a PE is laded,When moving, locate from inside the file and depart gives metadata and IL.
Before farther specification,I think you already the brief list that some IL dictate.Although it is not a complete detailed list,Also do not need to you are memorized and understand,But it listed what you need, the intellectual base that C# program place is based on.
Arithmetic and logistic operator
Control flows
Direct memory is visited
Stack operation
Parameter standoff ministry is variable
Stack allocation
Object mode
Example type is worth
Critical area
Array
Cent position
Compile immediately implement (JITters)