Ejemplo n.º 1
0
        public void run()
        {
            this.Func1Ins = new func1Delegate(func1);
            AsyncCallback callback = new AsyncCallback(callbackFunc);

            Console.WriteLine("Function1 Called");
            IAsyncResult func1Result = Func1Ins.BeginInvoke("Input 1", callback, null);

            string func1Return = Func1Ins.EndInvoke(func1Result);//Wait on Async Operation to be finished /*blocks the current thread*/
            Console.WriteLine("EndInvoke Called");
            Console.WriteLine(func1Return);
        }
Ejemplo n.º 2
0
        public void run()
        {
            this.Func1Ins = new func1Delegate(func1);
            AsyncCallback callback = new AsyncCallback(callbackFunc);

            Console.WriteLine("Function1 Called");
            IAsyncResult func1Result = Func1Ins.BeginInvoke("Input 1", callback, null);

            string func1Return = Func1Ins.EndInvoke(func1Result);//Wait on Async Operation to be finished /*blocks the current thread*/

            Console.WriteLine("EndInvoke Called");
            Console.WriteLine(func1Return);
        }