string search = textBox1.Text; listBox2.Items.Clear(); foreach (string val in listBox1.Items) { if (val.StartsWith(search)) { listBox2.Items.Add(val); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)