This is actually C # 7.1, which introduces the main async line.
The purpose of this method is in situations where the Main method calls one or more asynchronous methods. Prior to C # 7.1, you needed to introduce a specific ceremony for this main method, for example, to call these asynchronous methods using SomeAsyncMethiod().GetAwaiter().GetResult() .
Thanks to the ability to celebrate Main async simplifies this ceremony, for example:
static void Main(string[] args) => MainAsync(args).GetAwaiter().GetResult(); static async Task MainAsync(string[] args) { await ... }
becomes:
static async Task Main(string[] args) { await ... }
For a good record of using this feature, see C # 7 Series, Part 2: Async Main .
source share