C#7.1

Async main

The entry point for an application can have the async modifier.

BEFORE

static int Main(){ return DoAsyncWork().GetAwaiter().GetResult();}

NOW

static async Task<int> Main(){ return await DoAsyncWork();}

Default literal expressions

You can now omit the type on the right-hand side of the initialization

BEFORE

Func<string, bool> whereClause = default(Func<string, bool>);

NOW

Func<string, bool> whereClause = default;

Inferred tuple element names

The names of tuple elements can be inferred from the variables used to initialize the tuple

BEFORE

int count = 5;string label = "Colors used in the map";var pair = (count: count, label: label);

NOW

int count = 5;string label = "Colors used in the map";var pair = (count, label);

Element names are "count" and "label". Inferred by compiler.