Open In App

C# | Version History

Improve
Improve
Like Article
Like
Save
Share
Report

C# is a programming language that was first released in 2000 by Microsoft as part of the .NET framework. Since its initial release, C# has gone through several versions, each adding new features and improving performance. Here’s a brief overview of the major versions of C#:

  1. C# 1.0: This was the initial version of C# released in 2000. It included features such as garbage collection, type safety, and exception handling.
  2. C# 2.0: This version was released in 2005 and introduced several new features, including generics, partial classes, anonymous methods, and iterators.
  3. C# 3.0: This version was released in 2007 and introduced several new language features, including lambda expressions, extension methods, and automatic properties.
  4. C# 4.0: This version was released in 2010 and introduced several new features, including dynamic binding, named and optional parameters, and improved COM interoperability.
  5. C# 5.0: This version was released in 2012 and introduced several new features, including async/await, caller info attributes, and improved support for covariance and contravariance.
  6. C# 6.0: This version was released in 2015 and introduced several new features, including expression-bodied members, null-conditional operators, and string interpolation.
  7. C# 7.0: This version was released in 2017 and introduced several new features, including tuples, pattern matching, and local functions.
  8. C# 8.0: This version was released in 2019 and introduced several new features, including nullable reference types, switch expressions, and async streams.
  9. C# 9.0: This version was released in 2020 and introduced several new features, including top-level programs, records, init-only properties, and improved pattern matching.
  10. C# 10.0: This version was released in 2021 and introduced several new features, including global using directives, interpolated strings as format strings, file-scoped namespaces, and more.

Each new version of C# has built on the previous version and added new features and improvements to the language. Developers can choose the version of C# to use based on the requirements of their application and the features that they need.

C# is a general-purpose, modern and object-oriented programming language pronounced as “C Sharp”. It was developed by Microsoft led by Anders Hejlsberg and his team within the .NET initiative and was approved by the European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO). The current version of C# is C# 7.3

The below table shows some important features introduced in each version of C#: 
 

Version .NET Framework Visual Studio Major Features
C# 1.0 .NET Framework 1.0 Visual Studio .NET 2002
C# 1.2 .NET Framework 1.1 Visual Studio .NET 2003
  • Basic features
C# 2.0 .NET Framework 2.0 Visual Studio 2005
  • Generics
  • Partial types
  • Anonymous methods
  • Nullable types
  • Iterators
  • Covariance and contravariance
  • Method group conversions (delegates)
  • Static classes
  • Delegate inference
  • Getter/setter separate accessibility
C# 3.0 .NET Framework 2.0/3.0/3.5 Visual Studio 2008/2010
C# 4.0 .NET Framework 4 Visual Studio 2010
  • Dynamic binding
  • Named/optional arguments
  • Generic covariant and contravariant
  • Embedded interop types
C# 5.0 .NET Framework 4.5 Visual Studio 2012/2013
  • Asynchronous members
  • Caller info attributes
C# 6.0 .NET Framework 4.6 Visual Studio 2015
  • Static imports
  • Exception filters
  • Auto-property initializers
  • Expression bodied members
  • Null propagator
  • String interpolation
  • nameof operator
  • Index initializers
  • Await in catch/finally blocks
  • Default values for getter-only properties
C# 7.0 .NET Framework 4.6.2 Visual Studio 2017
  • Out variables
  • Tuples and deconstruction
  • Pattern matching
  • Local functions
  • Expanded expression bodied members
  • Ref locals and returns
  • Discards
  • Binary Literals and Digit Separators
  • Throw expressions
C# 7.1 .NET Framework 4.7 Visual Studio 2017 version 15.3
  • async Main method
  • default literal expressions
  • Inferred tuple element names
  • Pattern matching on generic type parameters
C# 7.2 .NET Framework 4.7.1 Visual Studio 2017 version 15.5
  • Techniques for writing safe efficient code
  • Non-trailing named arguments
  • Leading underscores in numeric literals
  • private protected access modifier
  • Conditional ref expressions
C# 7.3 .NET Framework 4.7.2 Visual Studio 2017 version 15.7
  • You can access fixed fields without pinning.
  • You can reassign ref local variables.
  • You can use initializers on stackalloc arrays.
  • You can use fixed statements with any type that supports a pattern.
  • You can use additional generic constraints.
C# 8.0 .NET Core 3.0/.NET Standard 2.1  Visual Studio 2019 version 16.3
  • Readonly members
  • Default interface methods
  • Pattern matching enhancements
  • Switch expressions
  • Property patterns
  • Tuple patterns
  • Positional patterns
  • Using declarations
  • Static local functions
  • Disposable ref structs
  • Nullable reference types
  • Asynchronous streams
  • Indices and ranges
  • Null-coalescing assignment
  • Unmanaged constructed types
  • Stackalloc in nested expressions
  • Enhancement of interpolated verbatim strings

References: 


Last Updated : 21 Feb, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads