1.2 Evolution of C#

Stasoz
3 min readMar 21, 2022

--

You can check this course on my website.

Since the first release, С# has gone through a lot of changes and now we will review the most important changes from the C# 1.0 to the C# 10.0

C# 1.0 (.NET Framework 1.0)

Together with Visual Studio 2002, Microsoft released the first version of C#, looked a lot like Java.

The major features of C# 1.0 include:

  • Classes
  • Structs
  • Interfaces
  • Events
  • Properties
  • Delegates
  • Attributes
  • Operators and expressions

As we can see in this version there are basic functionality for building applications, no generic classes and sugar syntax.

C# 2.0 (.NET Framework 2.0\3.0)

Now things start to get interesting. Microsoft released a second version of the language with Visual Studio 2005.

  • Generics
  • Static and Partial types
  • Nullable value types
  • Co-variance and Contravariance
  • Iterators
  • Anonymous methods

These features are quite useful, because they allow you to write code in more generic and prettier way.

C# 3.0 (.NET Framework 2.0\3.0\3.5)

C# 3.0 — game changer in C# world :) Version came late in 2007 with Visual Studio 2008 and it established C# as a truly formidable programming language.

Some major features in this version:

  • Lambda Expression
  • LINQ
  • Implicit Type (var)
  • Extensions Methods
  • Expression Trees

C# 4.0 (.NET Framework 4.0)

The fourth version, which was released in 2010 with Visual Studio 2010, was not as breakthrough as the third version, but still brought some useful features:

  • Named Arguments
  • Optional Parameters
  • Late Binding
  • More COM Support
  • Dynamic Keyword

C# 5.0 (.NET Framework 4.5)

In the next version, which was released with Visual Studio 2012, there are also few updates, but no less important:

  • Async Programming (async/await)
  • Caller info attributes

C# 6.0 (.NET Framework 4.6, .NET Core 1.0\1.1)

With version 6.0 released with Visual Studio 2015, many small features have been released that improve productivity:

  • Null propagator
  • Exception filters
  • Auto-property initializers
  • String interpolation
  • nameof operator
  • Expression bodied members
  • await in catch and finally blocks
  • Index initializers
  • Static imports

C# 7.0 (.NET Framework 4.6.2\4.7)

With Visual Studio 2017 we got a new version of C# — C# 7.0. In this version, a lot of interesting things have been added, as in C# 6.0.

  • Out variables
  • Tuples and deconstruction
  • Pattern matching
  • Local functions
  • Ref returns and locals
  • Discards
  • Binary Literals
  • Digit Separators
  • Generalized async return types
  • More expression-bodied members
  • Throw expressions

C# 8.0 (.NET Framework 4.8, .NET Core 3.0\3.1)

Feature list that were added to C# 8:

  • Readonly members
  • Nullable reference types
  • Using declarations
  • Asynchronous stream
  • Default interface methods
  • Pattern matching enhancements
  • Null-coalescing assignment

C# 9.0 (.NET 5.0)

C# 9.0 adds the following features and enhancements to the C# language:

  • Records and mutation
  • Top-level programs
  • Init-only properties
  • Data members
  • Init accessors & read-only fields
  • Records With-expressions
  • Value-based equality

C# 10.0 (.NET 6.0)

And the latest version brought us:

  • Global usings
  • Record structs
  • File-scoped namespaces
  • Null parameter checking

C# 10 is the latest version of the C#. You can also follow the status of features that Microsoft want to add — GitHub.

Contents

Previous article -> 1.1 What is C# and .NET?

Next article -> 1.3 First Program and Install VS 2022

Join to our community in Telegram — https://t.me/itifico

If you want to support me, you can buy me a cup of coffee and I will drink it when I write the next article :)

Donations list:

  1. Dinesh Chintalapudi — 3$
  2. Unknown — 5$

--

--

Stasoz

Full Stack Developer who is inspired by new technologies