CLS, CTS, CL, VES in .NET and .NET Architecture

 

CLS: It is a set of base rules, all .Net languages has to adopt to interoperate with each other. Most importantly after compilation any .Net language program has to generate the same type of output code known as Common Intermediate Language code as shown below.

                                  

 

CTS: According to CTS(Common Type System), all .Net languages has to adopt uniform data structure i.e., similar types must be uniform in size in all languages of .Net. 

Most of the languages under .Net are derived from same existing language, so names of the data types will be differ from language to language. Even if the names are different  similar data types will always be same in size. 

A data type that is used in any language after compilation will be converted into IL type where in IL format all similar types will be same as following.

                              

 

When we want to consume the code of one language in the other language, for that the code of first language gets converted into IL code and that IL code is consume from other language. So the IL types are exchanged with the language who wants to consume in its understandable format only.

                                   

CLS and CTS are the foundation for language independency/interoperability i.e., available between all .Net languages because we do not have any mismatch in code or mismatch in data types problem. 

Class Library(CL): A library is a set of reusable functionalities. Every language requires libraries for programming in that language whereas one language libraries cannot be consumed in other languages. 

All languages of .Net also requires these libraries but in .Net for all languages we have been given with only a single set of libraries known as base class libraries.

 

 

 

These base class libraries have been developed using C# language and being consumed from all other .Net languages. 

VES(Virtual Execution System): VES known as CLR(Common Language Runtime), all.Net languages after compilation gets converted into CIL code. This CIL code can be  carried and executed on any machine provided as operating system specific VES or CLR is available which converts CIL code into machine code according to the platform. 

              

 

.Net framework Architecture: