public static void TestAsyncAwait() { var testThread = new AsyncAwaitExample(); testThread.DoWork(); while (true) { Console.WriteLine("Doing work on the Main Thread !!"); } }
static void Main(string[] args) { var exampleToRun = ExamplesEnumeration.ReturnValue; switch (exampleToRun) { case ExamplesEnumeration.AsyncAwait: AsyncAwaitExample.ShowAsyncAwait(); break; case ExamplesEnumeration.ReturnValue: ReturnValueExample.ShowAsyncAwait(); break; } Console.Read(); }