Created
December 12, 2015 10:31
-
-
Save BojanKomazec/6dd7f637a180b067ba7f to your computer and use it in GitHub Desktop.
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
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