예제 #1
0
        private void btnMulticastDelegate_Click(object sender, EventArgs e)
        {
            //Событие 1
            cActionOne One = new cActionOne();

            One.Act(textBox1.Text);


            //Событие 2
            cActionTwo Two = new cActionTwo();

            Two.Act(textBox1.Text);


            Multicast_Delegate dDelegate = new cActionOne().Act;

            dDelegate += new cActionTwo().Act;

            dDelegate("Снеговик");
        }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            cActionTwo a = new cActionTwo();

            a.Act(textBox1.Text);
        }