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();
        }