Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CIL, CLS, and CTS in .NET

What is the CIL, CTS, and CLS in .NET and what is the difference between them?

like image 265
Domnic Avatar asked Jan 04 '10 05:01

Domnic


1 Answers

CIL (Common Intermediate Language) is the byte code to which your C# or Visual Basic code is compiled. It's the "machine code" of the .NET execution engine.

The CTS (Common Type System) is the representation of types (classes and structures) at the compiled level. Basically, it's saying that all .NET languages will use a common way of representing types (classes and structures).

The CLS (Common Language Specification) is a set of constraints on APIs and a complementary set of requirements on languages. If a library is CLS-compliant (i.e. adheres to all the constraints), then any CLS-compliant language will be able to use that API. Conversely, a CLS-compliant language is guaranteed to be able to use any CLS-compliant library. For example, a CLS-compliant language is guaranteed to support Int32, so the CLS guarantees it's safe for library writers to use Int32 in their APIs.

like image 117
itowlson Avatar answered Sep 22 '22 06:09

itowlson