Select ComboBox by value in winforms
问题 How to select combo box by value in WinForms? I am setting combobox like that: ComboboxItem item = new ComboboxItem(); item.Text = "Test"; item.Value = 1; cmbComboBox.Items.Add(item); internal class ComboboxItem { public string Text { get; set; } public object Value { get; set; } public override string ToString() { return Text; } } I need to select where Value = 1 回答1: Because ObjectCollection does not implement the generic IEnumerable<T> only IEnumerable you can't use LINQ standard query