for (int i = 1; i <= 10; i++)
{
string[] str = {"项目"+i};
foreach (string s in str)
{
this.comboBox1.Items.Add(s.ToString());
}
}
//comboBox1.SelectedIndex = 2;
comboBox1.SelectedIndex = comboBox1.Items.IndexOf("项目2");

posted on 2011-04-19 10:39  天之饺子  阅读(12079)  评论(0编辑  收藏  举报