Here you will find seven new cool features of the new version of the C# language – C# 6.0 or a.k.a. C# vNext.

What is new in C# 6.0?

­Auto-property Enhancements

­Primary Constructors (dropped)

­Expressions as Function Body

­Using Static

­Exception Filters

­Declaration Expressions (inline declarations)

­Nameof Expressions

­Null-conditional Operators

­Index Initializers

­Await in catch/finally

­Not Implemented, Yet

1. Auto-property Enhancements

You can initialize auto-property, the same way you can do to a field.

2. Parameters on Classes and Structs

Using a primary constructor in C# 6.0.

You can also add validations or other code to the primary constructor.

3. Using Static

Now you can access all static members without a qualification.

4. Exception Filters

if the conditional expression evaluates to true, then the catch block is run.

The feature is already available in VB.NET and F#.

5. Null-conditional Operators

You can access members and elements only when the object is not null.

Together with the null coalescing operator ??:

6. Index Initializers

New syntax to initialize a index collections.

Old way (C# 5.0)

New way (C# 6.0)

7. $ sign

The new way to initialize index objects and access them.