My_listBox.SelectedItems.Clear(); for (int i = My_listBox.Items.Count - 1; i >= 0; i--) { if (My_listBox.Items[i].ToString().ToLower().Contains(My_textBox_Search.Text.ToLower())) { if (My_listBox.Items.Count == null) { MessageBox.Show("No matches found."); } else { My_listBox.SetSelected(i, true); } } else { My_textBox_ResultOfSearchListedData.Text = My_listBox.SelectedItems.Count.ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)