---begin
private void button7_Click(object sender, EventArgs e)
{
try
{
this.label2.Text = "1事件";
this.button8_Click(this, new EventArgs());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void button8_Click(object sender, EventArgs e)
{
this.label2.Text = "2事件";
testr = Class1.RData;
if (testr != null)
{
foreach (byte bb in testr)
{
this.label2.Text += bb.ToString() + ",";
}
}
}
---end
上面的代码中,如果希望1事件触发了2事件后把自身终止掉而不影响2事件的执行,有没有这样的方法呢??