C#

C# Versions and Features

C# versions

  • C# 1 comes in 2002 with .NET framework 1.0 and Visual Studio 2002
  • C# 2 comes in 2005 with .NET framework 2.0 and Visual Studio 2005
  • C# 3 comes in 2008 with .NET framework 2.0 and Visual Studio 2008
  • C# 4 comes in 2010 with .NET framework 4.0 and Visual Studio 2010
  • C# 5 comes in 2012 with .NET framework 4.5 and Visual Studio 2012
  • C# 6 preview comes in 2014 with .NET 2015 preview and Visual Studio 2013 extensions and Visual Studio 2015 preview

C# Features

C# 2.0 features


C# 3.0 features


  • Implicit typed Local Variables
  • Extension Methods
  • Auto implemented properties
  • Anonymous types
  • Lambda expressions
  • Expression tree
  • Partial methods

C# 4.0 features


  • dynamic type
  • Named and optional arguments
  • Generic covariant and contravariant
  • Type Equivalence and Embedded Interop Types

C# 5.0 features


  • Asynchronous methods
  • Caller information attributes

C# 6.0 features


  • Expression bodied methods
  • Conditional access operator
  • Primary constructor
  • Await in catch block
  • Exception filters
  • String interpolation

.NET Framework Versions

  • 1.0 comes with CLR version 1.0
  • 1.1 comes with CLR version 1.1
  • 2.0 comes with CLR version 2.0
  • 3.0 comes with CLR version 2.0
  • 3.5 comes with CLR version 2.0
  • 4 comes with CLR version 4
  • 4.5 (4.5.1 and 4.5.2) comes with CLR version 4
  • 2015 preview comes with CLR version 4