No Edge Software
  • Search results
No Edge Software

Async/await in console app

Sample Code

// PM> Install-Package Nito.AsyncEx

using Nito.AsyncEx;

class Program {
    static void Main(string[] args) {
        AsyncContext.Run(() => MainAsync(args));

    static async void MainAsync(string[] args) {
        // await Something...


This was an answer on StackOverflow by async/await superstar and blogger Stephen Cleary, who wrote the referenced NuGet package.


Joe Enos