There is some string value. Can I use Linq query to find out if this value is in the ComboBox?

    1 answer 1

    It is possible through the Contains() method:

     string s = "1"; comboBox1.Items.Add("1"); comboBox1.Items.Add("2"); comboBox1.Items.Add("3"); bool result = comboBox1.Items.Contains(s); 
    • 2
      I think it makes sense to clarify that this is not the Linq - method - user227049