111,120
社区成员
发帖
与我相关
我的任务
分享private int index = -1;
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (index != -1)
Console.WriteLine(string.Format("你之前选择的是:{0}.", index));
//do something
//.........
index = this.comboBox1.SelectedIndex;
} private int index = -1;
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (index != -1)
Console.WriteLine(string.Format("你之前选择的是:{0}.", index));
//do something
//.........
index = this.comboBox1.SelectedIndex;
}