- C# 7 and .NET Core 2.0 High Performance
- Ovais Mehboob Ahmed Khan
- 279字
- 2021-08-27 18:47:12
Understanding MSIL, CLI, CTS, and CLS
When we build our project, the code is compiled into the Intermediate Language (IL), also known as Microsoft Intermediate Language (MSIL). MSIL is compliant with the Common Language Infrastructure (CLI), where CLI is the standard that provides a common type system and a language specification, respectively known as the Common Type System (CTS) and Common Language Specification (CLS).
The CTS provides a common type system and compiles the language-specific types into the compliant data types. It standardizes all the .NET languages' data types to a common data type for language interoperability. For example, if the code is written in C#, it will be converted to the specific CTS.
Suppose we have two variables, defined in the following code fragment using C#:
class Program { static void Main(string[] args) { int minNo = 1; long maxThroughput = 99999; } }
On compilation, the compiler generates the MSIL into an assembly that will be available through the CoreCLR to perform the JIT and convert it into the native machine code. Note that the int and long types are converted to the int32 and int64 respectively:

It is not necessary for every language to comply completely with the CTS, and it can support the smaller footprint of the CTS, too. For example, when VB.NET was first released in .NET Framework, it only supported the signed integer data types, and there was no provision to use unsigned integers. With later versions of .NET Framework, and now with .NET Core 2.0, we can use all managed languages, such as C#, F#, and VB.NET, to develop applications and easily reference any project's assembly.
- 數據分析實戰:基于EXCEL和SPSS系列工具的實踐
- 算法競賽入門經典:習題與解答
- Enterprise Integration with WSO2 ESB
- Lean Mobile App Development
- 深入淺出MySQL:數據庫開發、優化與管理維護(第2版)
- INSTANT Cytoscape Complex Network Analysis How-to
- 數據挖掘原理與SPSS Clementine應用寶典
- 高維數據分析預處理技術
- Flutter Projects
- 編寫有效用例
- 新手學會計(2013-2014實戰升級版)
- Hadoop 3實戰指南
- 大數據分析:R基礎及應用
- 代碼的未來
- Unity 4.x Game AI Programming