CLR, CTS and CLS

来源:互联网 发布:学汽车美容软件 编辑:程序博客网 时间:2024/06/07 20:28

 

CLR(Common Language Runtime) managed

CTS(Common Type System) Implement variable compatible type of COM and define the way of use user-defined type to extend types. Support all possible data type and programming structure, define how to express the format of  .NET metadata.

CTS data type                     

C# keyword                  

 C++/CLI keyword

System.Byte                  

byte

          unsigned char

System.SByte

sbyte

          signed char

System.Int16

short

          short

System.Int32

int

          int or long   

System.Int64

long

          __int64      

System.UInt16

ushort

          unsigned short         

System.UInt32

uint

  unsigned int or unsigned long     

System.UInt64

ulong

         unsigned __int64 

System.Single

float

           Float

System.Double

double

          Double

System.Object

object

          Object&^  

System.Char

char

          wchar_t

System.String

string

          String^

System.Decimal

decimal

          Decimal

System.Boolean

bool

          Bool

CLS(Common Language Specification)Define sub-set of common types and programming structure which is supported by all .NET language.

 

BCL(Basic Library)

 

Encapsulation kinds of basic types(Thread, File I/O, Web API, GUI desktop API, Data access, Security, Remote Handle API)

 

CIL(Common Intermediate Language)

 

C# compiler generate the CIL.

CIL---JIT compiler--->CPU instruction.

Using ildasm.exe in VS command to see the CIL code.(Ctrl+M: see all MetaInfo)

BTW, Reflector can see all the managed code.

原创粉丝点击