We can find the C# version used in a project:
Alternatively, we can find the .NET version in a project by opening the .csproj file.
A table summarizing the C# language versions associated with different versions of the .NET Framework and .NET Core/.NET (after .NET Core 3.1, it was unified into a single .NET platform):
Version | C# Language Version | Release Date | LTS/Standard | End of Support Date |
---|---|---|---|---|
.NET Framework 1.0 | C# 1.0 | February 2002 | No | July 2009 |
.NET Framework 1.1 | C# 1.0 | April 2003 | No | July 2009 |
.NET Framework 2.0 | C# 2.0 | November 2005 | No | July 2013 |
.NET Framework 3.0 | C# 2.0 | November 2006 | No | July 2013 |
.NET Framework 3.5 | C# 3.0 | November 2007 | No | July 2013 |
.NET Framework 4.0 | C# 4.0 | April 2010 | No | July 2015 |
.NET Framework 4.5 | C# 5.0 | August 2012 | No | January 2016 |
.NET Framework 4.5.1 | C# 5.0 | October 2013 | No | January 2016 |
.NET Framework 4.5.2 | C# 5.0 | December 2014 | No | January 2016 |
.NET Framework 4.6 | C# 6.0 | November 2015 | No | April 2019 |
.NET Framework 4.6.1 | C# 6.0 | August 2016 | No | April 2019 |
.NET Framework 4.6.2 | C# 7.0 | August 2016 | No | April 2019 |
.NET Framework 4.7 | C# 7.0 | April 2017 | No | April 2024 |
.NET Framework 4.7.1 | C# 7.1 | October 2017 | No | April 2024 |
.NET Framework 4.7.2 | C# 7.3 | December 2018 | No | April 2024 |
.NET Framework 4.8 | C# 8.0 | April 2019 | No | November 2028 |
.NET Core 1.0 | C# 6.0 | June 2016 | No | June 2018 |
.NET Core 1.1 | C# 7.0 | November 2016 | No | June 2018 |
.NET Core 2.0 | C# 7.0 | August 2017 | No | August 2019 |
.NET Core 2.1 | C# 7.3 | August 2018 | Yes | August 2021 |
.NET Core 2.2 | C# 7.3 | December 2018 | No | December 2020 |
.NET Core 3.0 | C# 8.0 | September 2019 | No | March 2020 |
.NET Core 3.1 | C# 8.0 | December 2019 | Yes | December 2022 |
.NET 5.0 | C# 8.0 | November 2020 | No | May 2022 |
.NET 6.0 | C# 10.0 | November 2021 | Yes | May 2024 |
.NET 7.0 | C# 11.0 | May 2022 | No | May 2023 |
.NET 8.0 | C# 12.0 | November, 2023 | Yes | November, 2026 |
.NET 9.0 | C# 13.0 | November, 2024 | Yes | May, 2026 |
.NET 10.0 (Upcoming) | November 2025 (projected) | |||
.NET 11.0 (Upcoming) | November 2026 (projected) | |||
An overview of the major features and enhancements introduced in each version of .NET and the corresponding C# languages:
.### .NET Framework
.NET Framework 1.0/1.1 (2002/2003)
- Key Features:
- Base Class Library (BCL): Collections, I/O, threading, etc.
- ASP.NET: Web Forms for web development.
- ADO.NET: Data access library.
- WinForms: Desktop application development.
- C# 1.0:
- First version of the language.
- Support for object-oriented programming (OOP).
- Features: classes, inheritance, interfaces, delegates, and events.
.NET Framework 2.0 (2005)
- Key Features:
- Generics.
- Nullable types.
- Iterators (
yield
keyword). - ASP.NET 2.0: Master pages, themes, and data controls.
- ADO.NET enhancements.
- C# 2.0:
- Generics.
- Anonymous methods.
- Iterators.
- Nullable types.
partial
classes.
.NET Framework 3.0 (2006)
- Key Features:
- Windows Presentation Foundation (WPF): UI framework for desktop apps.
- Windows Communication Foundation (WCF): For service-oriented applications.
- Windows Workflow Foundation (WF): Workflow automation.
- Windows CardSpace: Identity management.
- C# 2.0: No changes.
.NET Framework 3.5 (2007)
- Key Features:
- Language Integrated Query (LINQ).
- ASP.NET AJAX.
- ADO.NET Entity Framework (EF).
- Windows Presentation Foundation (WPF) enhancements.
- C# 3.0:
- LINQ.
- Lambda expressions.
- Extension methods.
- Anonymous types.
- Automatic properties.
- Object and collection initializers.
.NET Framework 4.0 (2010)
- Key Features:
- Parallel Computing (PLINQ, TPL).
- Dynamic Language Runtime (DLR).
- Improved Entity Framework.
- MEF (Managed Extensibility Framework).
- C# 4.0:
- Dynamic types (
dynamic
keyword). - Named and optional parameters.
- Covariance and contravariance for generics.
- Dynamic types (
.NET Framework 4.5 (2012)
- Key Features:
- Async and await.
- Enhanced EF (Entity Framework 5.0).
- ASP.NET Web API.
- C# 5.0:
async
andawait
for asynchronous programming.- Caller information attributes (
CallerMemberName
, etc.).
.NET Core
.NET Core 1.0 (2016)
- Key Features:
- Cross-platform.
- Modular and lightweight framework.
- Command-line tooling.
- ASP.NET Core 1.0.
- C# 6.0: (Introduced with Visual Studio 2015)
- Expression-bodied members.
- Null-conditional operator (
?.
). - String interpolation.
- Auto-property initializers.
nameof
operator.- Exception filters.
.NET Core 2.0 (2017)
- Key Features:
- .NET Standard 2.0 compatibility.
- ASP.NET Core Razor Pages.
Span<T>
for high-performance memory access.
- C# 7.0/7.1:
- Tuples and deconstruction.
- Local functions.
ref
returns and locals.- Pattern matching (
is
,switch
). - Default literal.
- Async
Main
.
.NET Core 3.0 (2019)
- Key Features:
- Windows desktop app support (WinForms, WPF).
- gRPC and JSON APIs.
- C# 8.0 introduced.
- C# 8.0:
- Nullable reference types.
- Async streams.
- Indices and ranges.
- Default interface methods.
- Pattern matching enhancements.
- Switch expressions.
.NET 5 (2020)
- Key Features:
- Unified platform (.NET Core + .NET Framework).
- Single-file applications.
- Improved performance.
- C# 9.0 introduced.
- C# 9.0:
- Records.
- Init-only properties.
- Improved pattern matching (logical patterns).
- Top-level programs.
- Target-typed
new
. - Static anonymous functions.
.NET 6 (2021)
- Key Features:
- LTS release.
- Minimal APIs for ASP.NET Core.
- Improved hot reload.
- Improved performance and diagnostics.
- C# 10.0:
- File-scoped namespaces.
- Global using directives.
- Record structs.
- Interpolated string handlers.
- Improved lambda syntax.
.NET 7 (2022)
- Key Features:
- .NET MAUI (Multi-platform App UI).
- Performance improvements (Ahead-of-Time (AoT) compilation).
- Improved cloud-native development.
- C# 11.0:
- Raw string literals.
- List patterns.
- Required members.
- UTF-8 string literals.
- File-local types.
.NET 8
- Key Features:
- Native AOT for more platforms.
- Enhanced support for cloud and containerized environments.
- .NET MAUI improvements.
- C# 12.0 (Previewed):
- Primary constructors for classes.
- Expanded use of lambda expressions.
.NET 9
- C# 13.0
- Primary constructors for classes.
- Expanded use of lambda expressions.
params
collections- New
lock
type and semantics - New escape sequence -
\e
- Method group natural type improvements
- Implicit indexer access in object initializers
- Enable
ref
locals andunsafe
contexts in iterators and async methods - Enable
ref struct
types to implement interfaces - Allow ref struct types as arguments for type parameters in generics.
- Partial properties and indexers are now allowed in
partial
types. - Overload resolution priority allows library authors to designate one overload as better than others.