Exemplo n.º 1
0
        public static void TestAsyncAwait()
        {
            var testThread = new AsyncAwaitExample();

            testThread.DoWork();

            while (true)
            {
                Console.WriteLine("Doing work on the Main Thread !!");
            }
        }
Exemplo n.º 2
0
        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();
        }