During more than 20 years of development, we saw 11 versions of the C# language. Every version gave us some new and interesting features. Here is a brief overview of those features:
๐น ๐# ๐ญ.๐ฌ released with .NET 1.0 and VS2002 (January 2002).
๐น ๐# ๐ญ.๐ฎ released with .NET 1.1 and VS2003 (April 2003). The first version is called Dispose on IEnumerators which implemented IDisposable.
๐น ๐# ๐ฎ.๐ฌ released with .NET 2.0 and VS2005 (November 2005). Major new features: generics, anonymous methods, nullable types, and iterator blocks.
๐น ๐# ๐ฏ.๐ฌ released with .NET 3.5 and VS2008 (November 2007). Major new features: lambda expressions, extension methods, expression trees, anonymous types, implicit typing (var), and query expressions.
๐น ๐# ๐ฐ.๐ฌ released with .NET 4 and VS2010 (April 2010). Major new features: late binding (dynamic), delegate and interface generic variance, more COM support, named arguments, tuple data type, and optional parameters.
๐น ๐# ๐ฑ.๐ฌ released with .NET 4.5 and VS2012 (August 2012). Major features: async programming and caller info attributes.
๐น ๐# ๐ฒ.๐ฌ released with .NET 4.6 and VS2015 (July 2015). Enabled by Roslyn. Features: initializers for automatically implemented properties, using directives to import static members, exception filters, and more.
๐น ๐# ๐ณ.๐ฌ released with .NET 4.7 and VS2017 (March 2017). Major new features: tuples, ref locals and ref return, pattern matching (including pattern-based switch statements), and more.
๐น ๐# ๐ณ.๐ญ released with VS2017 v15.3 (August 2017). New features: async main, tuple member name inference, default expression, and pattern matching with generics.
๐น ๐# ๐ณ.๐ฎ released with VS2017 v15.5 (November 2017). New features: private protected access modifier, Span, aka interior pointer, aka stackonly struct, and everything else.
๐น ๐# ๐ณ.๐ฏ released with VS2017 v15.7 (May 2018). New features: enum, delegate, and unmanaged generic type constraints. ref reassignment.
๐น ๐# ๐ด.๐ฌ released with .NET Core 3.0 and VS2019 v16.3 (September 2019). Major new features: nullable reference-types, asynchronous streams, indices and ranges, readonly members, and more.
๐น ๐# ๐ต.๐ฌ released with .NET 5.0 and VS2019 v16.8 (November 2020). Major new features: init-only properties, records, with-expressions, data classes, positional records, top-level programs, and improved pattern matching.
๐น ๐# ๐ญ๐ฌ.๐ฌ released with .NET 6.0 (November 2021). Major new features: record structs, struct parameterless constructors, interpolated string handlers, and more.
๐น ๐# ๐ญ๐ญ.๐ฌ released with .NET 7.0 (November 2022). Major new features: file-scoped types, generic math support, auto-default structs, pattern match Span on a constant string, and more.
What features do you use the most?
Top comments (0)