With the recent release of C# 6.0, I thought it would be good to provide a brief explanation of the new features of the language. I’ve done them as individual posts:
- Null-conditional operators
- Auto-property initializers
- using static
- Expression bodies on properties and methods
- Exception filters
- String interpolation
- nameof expression
- Index initializers
There are a couple of other new features that didn’t really merit posts of their own. These primarily related to either improving handling for things (such as better resolution of overloads) or allowing some things that you probably didn’t realize you couldn’t do (such as using await in an exception catch block).
By the way – it is important to note that these are features of the C# language, independent of the .NET framework you are using. This means that you can target older versions of the framework but still take advantage of these new language features!
At some point I will also run through some of the changes and improvements in .NET 4.6 and also in Visual Studio, but those will need to wait for another day.