Skip to content

Instantly share code, notes, and snippets.

@BojanKomazec
Created December 12, 2015 10:31
Show Gist options
  • Save BojanKomazec/6dd7f637a180b067ba7f to your computer and use it in GitHub Desktop.
Save BojanKomazec/6dd7f637a180b067ba7f to your computer and use it in GitHub Desktop.
using System;
using System.Threading.Tasks;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Foo().Wait();
Console.WriteLine("Press ENTER...");
Console.ReadLine();
}
private static async Task Foo()
{
await Task.Run(
async () =>
{
await Task.Delay(500);
}
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment