鳕鱼天空

This is Mr Wang's Tech Blog.

C#版本和.NET版本以及VS版本的对应关系

版本 .NET Framework版本 Visual Studio版本 发布日期 特性

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)
调用方信息(CallerInformation)

C#6.0 .NET Framework4.6  Visual Studio 2015   

1、自动属性初始化的改进(有用)
2、String.Format的改进(有用)
3、字典的初始化
4、可以用static声明静态类的引用
5、nameof表达式
6、Null-条件表达式
7、在try-catch-finally中使用await

 

C#7.0          Visual Studio 2017 

1.out-variables(Out变量)
2.Tuples(元组)
3.Pattern Matching(匹配模式)
4.ref locals and returns (局部变量和引用返回)
5.Local Functions (局部函数)
6.More expression-bodied members(更多的函数成员的表达式体)
7.throw Expressions (异常表达式)
8.Generalized async return types (通用异步返回类型)
9.Numeric literal syntax improvements(数值文字语法改进)

 

Visual Studio 2019(.net frameworks 4.8, .NET Core 3.0)

https://devblogs.microsoft.com/dotnet/take-c-8-0-for-a-spin/

[译↑]初试C# 8.0

https://devblogs.microsoft.com/dotnet/building-c-8-0/

[译↑]C# 8.0 的新特性概览和讲解

C# 8.0的计划特性