if (myListBox.Items.Contains(myTextBox.Text)) { Console.WriteLine("YES"); }
foreach(ListItem item in yourlstbox.Items) { if(item.Text == yourtxtName.Text) { // isExists = true; your condition break; } }
private void textBox1_TextChanged(object sender, EventArgs e) { int index = listBox1.FindString(this.textBox1.Text); if (0 <= index) { listBox1.SelectedIndex = index; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)