c# combobox赋值区分大小写

发布时间:2019-02-20编辑:admin阅读(1386)

string str1= "abc";
for (int i = 0; i < ComboBox1.Items.Count; i++)
{
    if (string.Equals(str1, ComboBox1.GetItemText(ComboBox1.Items[i]), StringComparison.CurrentCulture))
    {
        ComboBox1.SelectedIndex = i;
        break;
    }
}


  关键字:c#combobox赋值区分大小写


鼓掌

0

正能量

0

0

呵呵

0


评论区