English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

C# Version History

Read-only members, default interface methods, declaration, static local functions, one-time ref structures, nullable reference types

C# for2002Year first released with .NET Framework 1.0 was introduced, and it has developed very quickly since then. The following table lists the important features introduced in each C# version:        

  Version
Important features                        
                           C#1.0                        
  • Basic features                             

C# 2.0
  • Generics

  • Partial types

  • Anonymous methods

  • Iterators

  • Nullable types

  • Private setter (property)

  • Method group conversion (delegation)

  • Covariance and contravariance

  • Static classes

C#3.0                        
  • Implicitly typed local variables

  • Object and collection initializers

  • Auto-implemented properties

  • Anonymous types

  • Extension methods

  • Query expressions

  • Lambda expressions

  • Expression trees

  • Partial methods

C#4.0                        
  • Dynamic binding (late binding)

  • Named parameters and optional parameters

  • Generic covariance and contravariance

  • Embedded interoperability type

C#5.0                        
  • Async Attributes

  • Caller Information

C#6.0                        
  • Expression-bodied Methods

  • Auto-Property Initialization

  • nameof Expressions

  • Main Constructor

  • Waiting in catch Blocks

  • Exception Filters

  • String Interpolation

C#7.0                        
  • out Variables

  • Tuples

  • Discarded Values

  • Pattern Matching

  • Local Functions

  • Generalized Asynchronous Return Type

  • More...

C#8.0                        
  • Read-only Members

  • Default Interface Methods

  • Declaration Usage

  • Static Local Functions

  • One-time ref structure

  • Nullable Reference Types

  • More...

The next section will learn how to set up the development environment for C#.