在C#2.0,3.0和4.0的新特性列表 [英] List of new features in C#2.0, 3.0 and 4.0

查看:130
本文介绍了在C#2.0,3.0和4.0的新特性列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在.NET 1.1的项目很长一段时间,我被卡在C#1.0,​​现在我想赶上最新和最伟大。
谷歌返回大量的在C#2.0的新功能的信息,但对于版本3和4,我发现只有部分信息。

I worked on the .Net 1.1 project for a long time and I was stuck at C# 1.0 and now I would like to catch up with the latest and greatest. Google returned lots of informations on new features in C# v2.0, but for the versions 3 and 4 I found only partial information.

有没有什么地方上互联网在V2.0,V3.0和V4.0在C#中引入的所有新特性列表一些?

Is there somewhere on the internet some list of all new features introduced in C# in v2.0, v3.0 and v4.0?

推荐答案

有关我自己的书完整的插件,但是希望不是没来由:得到的的的C#http://manning.com/skeet2\">second版。它跳过C#1,但进入细节上的C#2,3和4的所有功能。

Complete plug for my own book, but hopefully not gratuitous: get hold of the early access version of the second edition of C# in Depth. It skips C# 1, but goes into detail on every feature of C# 2, 3 and 4.

如果你只是想的功能列表,虽然,从附录C:

If you just want a list of features though, from appendix C:

C#2.0:

的C#2是仿制药的主要功能,可空类型,匿名方法和其他委托相关的增强和迭代器块。此外,引入了几个较小的特点:局部类型,静态类,与getter和setter方法​​,命名空间的别名,编译指令和固定大小的缓冲区不同的访问修饰符的属性。

The major features of C# 2 were generics, nullable types, anonymous methods and other delegate-related enhancements and iterator blocks. Additionally, several smaller features were introduced: partial types, static classes, properties with different access modifiers for getters and setters, namespace aliases, pragma directives and fixed-sized buffers.

C#3.0:

C#3,主要建朝LINQ,虽然很多功能是有用的其他地方。
自动属性,数组和局部变量,对象和
集合初始化和匿名类型的隐式类型都包含在章XREF CH8。
Lambda表达式和表达式树扩展在2.0版取得了
代表相关的进展,并扩展方法提供了查询表达式中的最后成分。部分方法只在C#3补充说,虽然部分机型本身是用C#2正如马克在评论中指出,泛型类型推断收到的C 3#一个相当大的推动作用。

C# 3 primarily built towards LINQ, although many features are useful elsewhere. Automatic properties, implicit typing of arrays and local variables, object and collection initializers and anonymous types are all covered in chapter XREF ch8 . Lambda expressions and expression trees extended the delegate-related progress made in version 2.0, and extension methods provided the last ingredient for query expressions. Partial methods were only added in C# 3, although partial types themselves were in C# 2. As Marc points out in the comments, generic type inference received a considerable boost in C# 3.

C#4.0:

C#4.0有针对互操作性的一些功能,但不具有相同的
从一而终的C#3.0。此外还有的
小特征之间(已命名的参数,可选的
参数,更好的COM互操作的,通用的方差)动态
打字的巨大功能相当明显的分歧和

C# 4.0 has some features aimed at interoperability, but doesn't have the same single-mindedness of C# 3.0. Again there's a reasonably clear divide between the "small" features (named arguments, optional parameters, better COM interop, generic variance) and the huge feature of dynamic typing.

我有一个bluffers指南 C#2和另一个 C#3 ,但我没有做的C#4但恐怕相当。

I've got a "bluffers guide" for C# 2 and another for C# 3, but I haven't done the equivalent for C# 4 yet I'm afraid.

这篇关于在C#2.0,3.0和4.0的新特性列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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