예제 #1
0
        static void Main()
        {
            math m=new math();

            mathdelegate d=new mathdelegate(m.addition);
            Console.WriteLine(d(10,20));
            d+=m.subtraction;
            d+=m.multiplication;
            Console.WriteLine(d(10,20));
        }
예제 #2
0
        static void Main()
        {
            math m=new math();

            mathdelegate d=new mathdelegate(m.addition);
            d(10,20);
            d+=m.subtraction;
            d+=m.multiplication;
            d(100,200);
        }
예제 #3
0
        static void Main()
        {
            math m = new math();

            mathdelegate d = new mathdelegate(m.addition);

            Console.WriteLine(d(10, 20));
            d += m.subtraction;
            d += m.multiplication;
            Console.WriteLine(d(10, 20));
        }
예제 #4
0
        static void Main()
        {
            math m = new math();

            mathdelegate d = new mathdelegate(m.addition);

            d(10, 20);
            d += m.subtraction;
            d += m.multiplication;
            d(100, 200);
        }
        static void Main(string[] args)
        {
            mathdelegate mathdeleg = new mathdelegate(add);

            mathdeleg += sub;
            mathdeleg += multi;
            mathdeleg += div;
            mathdeleg.Invoke(1000, 10);
            Program objp = new Program();

            objp.print += new printhandler(objp.onprint);//registering onprint event handler with print event
            objp.Show();
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            mathdelegate mathdeleg = new mathdelegate(addition);

            mathdeleg += subtraction;

            mathdeleg += multiplication;

            mathdeleg += division;

            mathdeleg.Invoke(10, 20);

            Program objp = new Program();

            objp.print += new printhandler(objp.onprint); //registering onprint event handler with print event

            objp.show();

            Console.ReadKey();
        }