What is new in C# 6.0

The latest version of C# language, C# 6.0 was just announced. C# 6.0 is also a part of Visual Studio 2015 and .NET 2015. C# 6.0 does not have any major new concepts of features but focuses on cleaner and leaner code.

Some of the key features introduced in C# 6.0 are the following:

  • Getter only auto properties
  • Initializers for auto properties
  • Methods and properties with expression bodies
  • Member access that protects against null
  • Interpolated strings
  • Index initializers
  • The nameof operator
  • Exception filters in exception handling
  • Await in catch and finally

 

Watch Mads Torgersen, Language PM for C# talks about these new features of C# 6.0.