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("Снеговик"); }
private void button2_Click(object sender, EventArgs e) { cActionTwo a = new cActionTwo(); a.Act(textBox1.Text); }