CIL,CLS,而CTS在.NET [英] CIL, CLS, and CTS in .NET

查看:243
本文介绍了CIL,CLS,而CTS在.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是 CIL ,的 CTS CLS 在.NET和它们之间有什么区别呢?

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

推荐答案

CIL(通用中间语言)是字节code,您的C#或Visual Basic code编译为。这是.NET执行引擎的机器code。

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.

的CTS(通用类型系统)是类型(类和结构)在编译级的重新presentation。基本上,它是说所有.NET语言将使用重presenting种(类和结构)的常用方法。

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).

在CLS(通用语言规范)是API的一组约束和一组对语言要求的互补性。如果库是符合CLS(即附着所有约束),那么任何符合CLS语言将能够使用该API。相反,一个符合CLS语言被保证是能够使用任何符合CLS库。例如,一个符合CLS的语言保证支持的Int32,所以CLS保证它的安全库作家使用的Int32在它们的API。

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.

这篇关于CIL,CLS,而CTS在.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆