How can I check that a combobox in winforms contains some value?
Is there any way of doing it without iterating through all items?
if (comboBox1.Items.Contains("some value"))
{
}
If the items are some custom object instead of strings you might need to override the Equals method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With