Exemplo n.º 1
0
        static void Main(string[] args)
        {
            mymethod inv = new mymethod(print);

            inv.BeginInvoke(null, null); //Asynchronous calling
            Console.WriteLine("I am Back");
            Console.Read();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            inv = new mymethod(Print);
            //inv += Print2;
            IAsyncResult tag = inv.BeginInvoke(new AsyncCallback(Callback), null);

            Console.WriteLine("I am Back 1st");
            // Thread.Sleep(5000);
            Console.WriteLine("I am Back 2");
            Console.WriteLine("I am Back 3");

            while (flag)
            {
                Console.WriteLine("I am Back 3");
            }
            Console.Read();
        }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     inv = new mymethod(Print);
     inv.BeginInvoke("ahmar", new AsyncCallback(Callback), null);
     Console.ReadLine();
 }
Exemplo n.º 4
0
 static void CallAsyncTest()
 {
     inv = new mymethod(Print);
     inv.BeginInvoke("Ranjeet", new AsyncCallback(Callback), null);
     Console.ReadLine();
 }