In C#, I have variable, a
, of type string
.
How do I find item
by value of a
in combobox
(I want find item with value no display text of combobox).
You can find it by using the following code.
int index = comboBox1.Items.IndexOf(a);
To get the item itself, write:
comboBox1.Items[index];