Last active
August 29, 2015 14:02
-
-
Save vkobel/bdd0514b9d20ae6159fe to your computer and use it in GitHub Desktop.
Simple Async Await remainder
This file contains hidden or 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 AsyncAwaitTest { | |
class Program { | |
async static void DoIt() { | |
Console.WriteLine("Enter DoIt!"); | |
await Task.Delay(2000); | |
Console.WriteLine("DoIt has ended!"); | |
} | |
static void Main(string[] args) { | |
Console.WriteLine("Starting..."); | |
DoIt(); | |
Console.WriteLine("Mostly done..."); | |
Console.ReadLine(); | |
} | |
} | |
} |
This file contains hidden or 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
Starting... | |
Enter DoIt! | |
Mostly done... | |
// [WAITING 2000ms] | |
DoIt has ended! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment