CTS:Common Type System 通用类型系统。

1.不仅可以把C#编译成.Net IL,还支持Basic、Python、Ruby等语言,甚至还支持Java。不同语言中的数据类型定义是不一样的,.Net中定义了通用的数据类型(CTS,Common Type System):String、Int16、Int32、Int64、Boolean、Double。通过转到定义可以看到这些都是类(结构体)。

2. Int64→long、Int32→int、Int16→short、String→string、Boolean→bool。

每种语言都定义了自己的类型,.Net通过CTS提供了公共的类型,然后翻译生成对应的.Net类型。

3.C#语言规范中定义了string、int、long、bool、double等原始类型,编译器会把这些类型翻译成CTS中的类。反编译看IL就能看到了。

4.string是c#中的类,String是.net Framework CTS的类

c# string映射为.net Framework的String

如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作

如果使用c#,建议使用string,比较符合规范。

.NET FrameWork 中的 CTS的更多相关文章

  1. .NET中的CTS、CLS和CLR

    在学习.NET的过程中,都会不可避免地接触到这三个概念,那么这三个东西是什么以及它们之间的关系是怎样的呢?我们在学习的过程中可能比较过多的会去关注CLR,因为CLR是.NET Framework的核心 ...

  2. C#.NET中的CTS、CLS和CLR

    以下内容来自:http://www.cnblogs.com/zagelover/articles/2741370.html 在学习.NET的过程中,都会不可避免地接触到这三个概念,那么这三个东西是什么 ...

  3. .NET中的CTS、CLS、CLR

    一.解释1 1.CLR(Common Language Runtime) :公共语言运行库 CLR 是CTS(Common Type System:通用类型系统)的实现, 即是说:CLR是应用程序的执 ...

  4. Entity Framework 教程——Entity Framework中的实体类型

    Entity Framework中的实体类型 : 在之前的章节中我们介绍过从已有的数据库中创建EDM,它包含数据库中每个表所对应的实体.在EF 5.0/6.0中,存在POCO 实体和动态代理实体两种. ...

  5. 减小ipa体积之删除frameWork中无用mach-O文件

    最近项目末期, 我们团队为了ipa的大小使用不少的体积减小的方法, 除了一些常规的方法之外, 我分享一下自己研究出来的新思路. 首先我们来简单的介绍一下mach-O. 什么是mach-O? Mach- ...

  6. 转-Spring Framework中的AOP之around通知

    Spring Framework中的AOP之around通知 http://blog.csdn.net/xiaoliang_xie/article/details/7049183 标签: spring ...

  7. Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->Spring Framework中的spring web MVC模块

    spring framework中的spring web MVC模块 1.概述 spring web mvc是spring框架中的一个模块 spring web mvc实现了web的MVC架构模式,可 ...

  8. Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->Spring Framework中web相关的知识(概述)

    Spring Framework中web相关的知识 1.概述: 参考资料:官网documentation中第22小节内容 关于spring web mvc:  spring framework中拥有自 ...

  9. Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->关于spring framework中的beans

    Spring framework中的beans 1.概述 bean其实就是各个类实例化后的对象,即objects spring framework的IOC容器所管理的基本单元就是bean spring ...

随机推荐

  1. 刷ROM必備的clockworkmod recovery

    Desire HD 手機早早就 Root,前陣子也S-OFF 變成工程版的 HBOOT(ENG S-OFF),想要刷機的朋友一定常常聽人提起 clockworkmod recovery ,接下來就是安 ...

  2. Martin Fowler关于IOC和DI的文章(原版)

    Inversion of Control Containers and the Dependency Injection pattern In the Java community there's b ...

  3. Java之Math类使用小结(转发)

    Java的Math类封装了很多与数学有关的属性和方法,大致如下: public class Main { public static void main(String[] args) { // TOD ...

  4. AutoResetEvent的基本用法

    The following example uses an AutoResetEvent to synchronize the activities of two threads.The first ...

  5. 完全理解Python的 '==' 和 'is'

    '==' 比较的是两个对象的值 'is' 比较的是两个对象的内存地址(id) 下面我们着重理解 'is'.对于这个,我们需要知道:小整数对象池,大整数对象池,以及intern机制 小整数池:Pytho ...

  6. cf1073d Berland Fair

    ~~~题面~~~ 题解: 可以发现,每走完一圈付的钱和买的数量是有周期性的,即如果没有因为缺钱而买不起某家店的东西,那么这一圈的所以决策将会和上一圈相同,这个应该是很好理解的,想想就好了. 因为钱数固 ...

  7. BZOJ4827:[AH2017/HNOI2017]礼物——题解

    https://www.lydsy.com/JudgeOnline/problem.php?id=4827 https://www.luogu.org/problemnew/show/P3723 题面 ...

  8. BZOJ4571:[SCOI2016]美味——题解

    https://www.lydsy.com/JudgeOnline/problem.php?id=4571 https://www.luogu.org/problemnew/show/P3293 一家 ...

  9. 51NOD 2026:Gcd and Lcm——题解

    http://www.51nod.com/onlineJudge/questionCode.html#!problemId=2026 参考及推导:https://www.cnblogs.com/ivo ...

  10. BZOJ2553 [BeiJing2011]禁忌 【AC自动机 + dp + 矩乘优化】

    题目链接 BZOJ2553 题解 话说在前,此题卡精度,最好开long double 先建\(AC\)自动机 求期望,逆着求,设\(f[i][j]\)为长度为\(i\)的串,当前匹配AC自动机\(j\ ...