Exemple #1
0
        public Form1()
        {
            InitializeComponent();

            //this.Click += Form1_Click;
            //this.DoubleClick += Form1_Click;

            //DemoEvent(5,8);


            //TestDel del = null;
            //del += SayHello;
            //del += SayBye;
            //del += Say;


            //CallBack(del, 8, 8);

            //CallBack((int a, int b) =>
            //{
            //    MessageBox.Show("resultL "+ (a + b));
            //}, 5, 8);

            //CallBack((int a, int b) =>
            //{
            //    MessageBox.Show("reasult: " + a * b);
            //}, 2, 2);

            BMW      bmw      = new BMW();
            Mercedes mercedes = new Mercedes();
            Ferrari  ferrari  = new Ferrari();

            bmw.Drive();
            mercedes.Drive();
            ferrari.Drive();
            ferrari.Door();
        }
Exemple #2
0
        public override void Drive()
        {
            MessageBox.Show("I'm chip driver");

            Ferrari ferrari = new Ferrari();
        }