我有一个字符串"测试1"和我的组合框包含test1,test2和test3.如何将所选项目设置为"test1"?也就是说,如何将我的字符串与其中一个comboBox项匹配?
test1
test2
test3
我在考虑下面这一行,但这不起作用.
comboBox1.SelectedText = "test1";
c# combobox winforms
c# ×1
combobox ×1
winforms ×1