Esempio n. 1
0
        static void Main()
        {
            MainApp m = new MainApp();
            //OnjDelegate CallBack = (OnjDelegate)Delegate.Combine(
            //        new OnjDelegate(MainApp.Plus),
            //        new OnjDelegate(MainApp.Minus),
            //        new OnjDelegate(m.Multiplication),
            //        new OnjDelegate(m.Division));

            //OnjDelegate CallBack = new OnjDelegate(MainApp.Plus);
            //CallBack += new OnjDelegate(MainApp.Minus);
            //CallBack += new OnjDelegate(m.Multiplication);
            //CallBack += new OnjDelegate(m.Division);

            OnjDelegate CallBack1 = new OnjDelegate(MainApp.Plus);
            OnjDelegate CallBack2 = new OnjDelegate(MainApp.Minus);
            OnjDelegate CallBack3 = new OnjDelegate(m.Multiplication);
            OnjDelegate CallBack4 = new OnjDelegate(m.Division);
            OnjDelegate CallBack  = CallBack1 + CallBack2 + CallBack3 + CallBack4;

            CallBack(4, 3);
        }