各位,本人是新手,麻烦帮忙了
解决方案
20
public Form3() { InitializeComponent(); button1.Click +=new EventHandler(button_Click); button2.Click +=new EventHandler(button_Click); } private void button_Click(object sender, EventArgs e) { Button btn = sender as Button; MessageBox.Show(btn.Text+ " 点击了一下"); }
40
+1