/*
* comboBox1.SelectedIndex 属性保存着comboBox1 的当前选中项的编号,
* -1为未选中项目,0为选中第一项,1为第二项,以此类推
*/
if(comboBox1.SelectedIndex == 0)
{
//代码块,自己写想要的功能吧
}
else if(comboBox1.SelectedIndex == 1)
{
//代码块,自己写想要的功能吧
}
else if(comboBox1.SelectedIndex == 2)
{
//代码块,自己写想要的功能吧
}
switch(combobox.selectedItem.tostring())
{
case "" :
……
}
string strSelected=combobox1.selectedText;
if(strSelected=="选择1")
{
操作1
}
else if(strSelected=="选择2")
{
操作2
}
else(strSelected=="选择3")
{
操作3
}