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");
相关文章:
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");
相关文章: