C# 1.0 |
.NET Framework 1.0 |
Visual Studio .NET 2002 |
2002.1 |
委托 |
|
|
|
|
事件 |
|
|
|
|
|
C# 1.1 |
.NET Framework 1.1 |
Visual Studio .NET 2003 |
2003.4 |
APM |
C# 2.0 |
.NET Framework 2.0 |
Visual Studio 2005(开始命名为Visual Studio) |
2005.11 |
泛型 |
|
|
|
|
匿名方法 |
|
|
|
|
迭代器 |
|
|
|
|
可空类型 |
|
|
|
|
|
|
|
|
|
|
C# 3.0 |
.NET Framework 3.0 |
Visual Studio 2008 |
2007.11 |
隐式类型的局部变量 |
|
.NET Framework 3.5 |
|
|
对象集合初始化 |
|
|
|
|
自动实现属性 |
|
|
|
|
匿名类型 |
|
|
|
|
扩展方法 |
|
|
|
|
查询表达式 |
|
|
|
|
Lambda表达式 |
|
|
|
|
表达式树 |
|
|
|
|
分部类和方法 |
|
|
|
|
Linq |
|
|
|
|
|
C# 4.0 |
.NET Framework 4.0 |
Visual Studio 2010 |
2010.4 |
动态绑定 |
|
|
|
|
命名和可选参数 |
|
|
|
|
泛型的协变和逆变 |
|
|
|
|
互操作性 |
|
|
|
|
|
C# 5.0 |
.NET Framework 4.5 |
Visual Studio 2012 |
2012.8 |
异步和等待(async和await) |
|
|
|
|
调用方信息(Caller Information) |
C# 6.0 |
.NET Framework 4.6 |
Visual Studio 2015 |
2016 |
|
|
|
|
|
自动属性初始化的改进 |
|
|
|
|
String.Format的改进 |
|
|
|
|
字典的初始化 |
|
|
|
|
可以用static声明静态类的引用 |
|
|
|
|
nameof表达式 |
|
|
|
|
Null-条件表达式 |
|
|
|
|
在try-catch-finally中使用await |
|
|
|
|
|
C# 7.0 |
.NET Framework 4.6 |
Visual Studio 2017 |
2017 |
|
|
|
|
|
out-variables(Out变量) |
|
|
|
|
Tuples(元组) |
|
|
|
|
Pattern Matching(匹配模式) |
|
|
|
|
ref locals and returns (局部变量和引用返回) |
|
|
|
|
Local Functions (局部函数) |
|
|
|
|
More expression-bodied members(更多的函数成员的表达式体) |
|
|
|
|
throw Expressions (异常表达式) |
|
|
|
|
Generalized async return types (通用异步返回类型) |
|
|
|
|
Numeric literal syntax improvements(数值文字语法改进) |