DEV Community

Srinivas R ๐Ÿ‡ฎ๐Ÿ‡ณ
Srinivas R ๐Ÿ‡ฎ๐Ÿ‡ณ

Posted on

๐—›๐—ถ๐˜€๐˜๐—ผ๐—ฟ๐˜† ๐—ข๐—ณ ๐—–# ๐—Ÿ๐—ฎ๐—ป๐—ด๐˜‚๐—ฎ๐—ด๐—ฒ

Image description

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?

Sentry image

See why 4M developers consider Sentry, โ€œnot bad.โ€

Fixing code doesnโ€™t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay