static void Main()
        {
            DelegateGreeting del = x => { Console.WriteLine("Welcome {0} to {1}", "Arab", x); System.Threading.Thread.Sleep(1000); return(2); };

            IAsyncResult AsycRes = del.BeginInvoke("California", CallBackMethod, null);

            Console.ReadLine();
        }
Example #2
0
        static void Main()
        {
            DelegateGreeting del = x => { Console.WriteLine("Welcome {0} to {1}", "Arab", x); System.Threading.Thread.Sleep(2000); };

            IAsyncResult AsycCall = del.BeginInvoke("California", null, null);

            del.EndInvoke(AsycCall);
            Console.WriteLine("Asyc call finished");
        }