Created
May 5, 2018 21:57
-
-
Save christiannagel/9d9d6634503aebc1e247d8f8d7ee539d to your computer and use it in GitHub Desktop.
async main with C# 7.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C# 7.0 | |
static void Main() | |
{ | |
SomeMethodAsync().Wait(); | |
} | |
// C# 7.1 | |
async static Task Main() | |
{ | |
await SomeMethodAsync(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment