It’s time to sum up all C# 6 features. Here is a list of all goodness with short examples implemented and tested in Visual Studio 2015.
- String interpolation
- Null-conditional (?. and ?) and null-coalescing (??) operators
- Index initializers
- Extension methods visible in collection initializers
- Exception filters
- Auto-property initializers
- Expression-bodied members
- Static using
- Extended async / await support
I’ve also found few features that were planned to be included in C# 6 but finally where dropped.
- Parameterless constructors in structs – details in New Features in C# 6 article from November 2014
- Primary constructions – details in The New and Improved C# 6.0 article from October 2014
- Declaration expressions – details in Declaration Expressions in C# 6.0 article from August 2014
I personally believe that it was a good decision for the first two as those were quite controversial. But I miss the ‘declaration expressions’ a bit. But maybe it’s going to be included in some future C# release… :)