C# |版本历史

原文:https://www.geeksforgeeks.org/c-sharp-version-history/

C# 是一种通用、现代和面向对象的编程语言,发音为“C Sharp”。它是由安德斯·海尔斯伯格和他的团队领导的微软在内开发的。NET 倡议并获得了欧洲计算机制造商协会(ECMA)和国际标准组织(ISO)的批准。C# 的当前版本是 C# 7.3

下表显示了 C# 各个版本中引入的一些重要特性:

| 版本 | 。NET 框架 | 可视化工作室 | 主要特点 | | --- | --- | --- | --- | | C# 1.0 | 。NET 框架 1.0 | Visual Studio。NET 2002 | * [Class](https://www.geeksforgeeks.org/c-class-and-object/) * [Structure](https://www.geeksforgeeks.org/c-sharp-structures-set-1/) * [interface](https://www.geeksforgeeks.org/c-sharp-interface/) * event * [Attribute](https://www.geeksforgeeks.org/c-sharp-properties/) * [Entrust](https://www.geeksforgeeks.org/c-sharp-delegates/) * expression * sentence * attribute * [Text](https://www.geeksforgeeks.org/c-sharp-literals/) | | C# 1.2 | 。NET 框架 1.1 | Visual Studio。NET 2003 | * fundamental function | | C# 2.0 | 。NET 框架 2.0 | Visual Studio 2005 | * [Generic](https://www.geeksforgeeks.org/c-sharp-generics-introduction/) * Division type * [Anonymous method](https://www.geeksforgeeks.org/anonymous-method-in-c-sharp/) * [Nullable type](https://www.geeksforgeeks.org/c-sharp-nullable-types/) * iterator * Covariance and inversion * Group conversion (delegation) * Static class * Entrusted reasoning * Getter/setter individual accessibility | | C# 3.0 | 。NET 框架 2.0/3.0/3.5 | Visual Studio 2008/2010 | * Automatically implement attributes * Anonymous type * Query expression * lambda expression * Expression tree * Expansion method * [Implicit typed local variable](https://www.geeksforgeeks.org/c-sharp-implicitly-typed-local-variables-var/) * [Division method](https://www.geeksforgeeks.org/partial-methods-in-c-sharp/) * And object initializers. | | C# 4.0 | 。NET 框架 4 | Visual Studio 2010 | * Dynamic binding * Named/optional parameters * Generic covariant and inversion * Embedded interoperability type | | C# 5.0 | 。NET 框架 4.5 | Visual Studio 2012/2013 | * Asynchronous member * Caller information attribute | | C# 6.0 | 。NET 框架 4.6 | Visual Studio 2015 | * Static import * Abnormal filter * Automatic property initializer * Expression body member * Air propagator * String interpolation * Operator name * Index initializer * Wait in the catch/finally block * Only the default value of getter property | | C# 7.0 | 。NET 框架 4.6.2 | Visual Studio 2017 | * [Output variable](https://www.geeksforgeeks.org/out-parameter-with-examples-in-c-sharp/) * Tuples and deconstruction * pattern matching * Local function * Extended expression body member * Reference a local variable and return * abandon * Binary character and number separator * Throwing expression | | C# 7.1 | 。NET 框架 4.7 | Visual Studio 2017 版 | * Asynchronous main method * Default literal expression * Inferred tuple element name * Pattern matching on generic type parameters | | C# 7.2 | 。NET 框架 4.7.1 | Visual Studio 2017 版 | * Skills of writing safe and efficient code * Non-trailing named parameter * Leading underline in numbers * Private protected access modifier * Conditional reference expression | | C# 7.3 | 。NET 框架 4.7.2 | Visual Studio 2017 版 | * Fixed fields can be accessed irregularly. * You can reallocate ref local variables. * You can use initializers on stackalloc arrays. * You can use fixed statements for any type of supported mode. * Additional general constraints can be used. | | C# 8.0 | 。NET Core 3.0/。网络标准 2.1 | Visual Studio 2019 版 | * Read only member * Default interface method * Pattern matching enhancement function * Switching expression * Attribute mode * Tuple pattern * Location mode * Use statement * Static local function * One-time reference structure * Nullable reference type * Asynchronous flow * Index and range * 零-零 |

参考文献: