Exemple #1
0
        public void Work()
        {
            AsyncClass asyncClass = new AsyncClass();

            asyncClass.Work();
            Console.WriteLine("Im on the main thread"); // just for console demo
        }
Exemple #2
0
        public void Work()
        {
            AsyncClass asyncClass = new AsyncClass();

            asyncClass.Work();
            Console.WriteLine("I am on the main thread");
            for (int i = 0; i < 10000; i++)
            {
                Console.Write(".");
            }
            Console.WriteLine("Main thread completed");
        }