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#:
- 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.
- C# 2.0: This version was released in 2005 and introduced several new features, including generics, partial classes, anonymous methods, and iterators.
- C# 3.0: This version was released in 2007 and introduced several new language features, including lambda expressions, extension methods, and automatic properties.
- 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.
- 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.
- C# 6.0: This version was released in 2015 and introduced several new features, including expression-bodied members, null-conditional operators, and string interpolation.
- C# 7.0: This version was released in 2017 and introduced several new features, including tuples, pattern matching, and local functions.
- C# 8.0: This version was released in 2019 and introduced several new features, including nullable reference types, switch expressions, and async streams.
- 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.
- 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 |
|
C# 2.0 | .NET Framework 2.0 | Visual Studio 2005 |
|
C# 3.0 | .NET Framework 2.0/3.0/3.5 | Visual Studio 2008/2010 |
|
C# 4.0 | .NET Framework 4 | Visual Studio 2010 |
|
C# 5.0 | .NET Framework 4.5 | Visual Studio 2012/2013 |
|
C# 6.0 | .NET Framework 4.6 | Visual Studio 2015 |
|
C# 7.0 | .NET Framework 4.6.2 | Visual Studio 2017 |
|
C# 7.1 | .NET Framework 4.7 | Visual Studio 2017 version 15.3 |
|
C# 7.2 | .NET Framework 4.7.1 | Visual Studio 2017 version 15.5 |
|
C# 7.3 | .NET Framework 4.7.2 | Visual Studio 2017 version 15.7 |
|
C# 8.0 | .NET Core 3.0/.NET Standard 2.1 | Visual Studio 2019 version 16.3 |
|
References:
- https://en.wikipedia.org/wiki/C_Sharp_(programming_language)#Versions
- https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history