๐ C# โ Versions
๐ C# โ Versions
Section titled โ๐ C# โ VersionsโVersion | Year | Key Features |
---|---|---|
1.0 | 2002 | Classes, structs, enums |
2.0 | 2005 | Generics, Nullable types |
3.0 | 2007 | LINQ, Lambdas, Auto-properties |
4.0 | 2010 | Dynamic, Named/Optional params |
5.0 | 2012 | async/await |
6.0 | 2015 | String interpolation, nameof, Null-conditional |
7.0 | 2017 | Tuples, Pattern matching |
7.1 | 2017 | async Main, default literal |
7.2 | 2017 | ref readonly, in parameters |
7.3 | 2018 | stackalloc in more places |
8.0 | 2019 | Switch expressions, Nullable Reference Types |
9.0 | 2020 | Records, Init-only, Top-level statements |
10.0 | 2021 | Global usings, File-scoped namespaces |
11.0 | 2022 | Required members, Raw string literals |
12.0 | 2023 | Primary constructors, Collection expressions |
13.0 | 2024 | Partial properties, field in property accessors |
Tip: Feature pages include before/after examples and pitfalls.