Esempio n. 1
0
        static void Main(string[] args)
        {
            // Delegate event without passing data output
            Number myNumber = new Number(100000);

            myNumber.PrintMoney();
            myNumber.PrintNumber();

            // Delegate event with passing data output
            NumberPass myNumberPass = new NumberPass(100000);

            myNumberPass.PrintMoneyPass();
            myNumberPass.PrintNumberPass();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            //PART A
            //output without passing data
            Number myNumber = new Number(100000);

            myNumber.PrintMoney();
            myNumber.PrintNumber();

            //PART B
            //output with passing data
            NumberPass myNumberPass = new NumberPass(100000);

            myNumberPass.PrintMoneyPass();
            myNumberPass.PrintNumberPass();
        }