new features in each version of c#
日期: 2010-02-09 类别: C# 查看评论Each version of C# has a number of new features and generally a major theme. The major themes have been generics and nullable types in C# 2.0, LINQ in C# 3.0, and dynamic types in C# 4.0.
The major features added in each release are generally considered to be the following:
- C#1.0/.Net1.0/vs2002
- C#1.2/.Net1.1/vs2003
- C# 2.0/.Net2.0/vs2005
- Generics (framework support was added, and C# benefited from this);
- Iterator pattern (the yield keyword);
- Anonymous methods (the delegate keyword),
- Nullable types, and the null coalescing operator (??).
- .Net3.0
- C# 3.0/.Net3.5/vs2008
- Anonymous types,
- Extension methods,
- Object initializers, collection initializers,
- Implicitly typed local variables (var keyword),
- Lambda expressions (=>),
- LINQ query expression pattern.
- C# 4.0/.Net4.0/vs2010
- Optional and Named Arguments
- Dynamic typing (dynamic type)
- Improved COM-Interop
- Contra and Co-Variance.
Stat.