【发布时间】:2023-03-25 23:56:01
【问题描述】:
在以下代码中,如何识别引发Click 事件的控件?
void x_Click(object sender, EventArgs e)
{
//How do I identify the sender?
}
private void fill()
{
for(blah)
{
Button x = new Button();
x.Click += new EventHandler(x_Click);
this.controls.Add(x)
}
}
【问题讨论】: