Today we will see "Find Existing Item in ComboBox in C#.net"
Code
Code
private void ComboBox1_Leave(System.Object sender, System.EventArgs e)
{
int resultIndex = -1;
resultIndex = ComboBox1.FindStringExact(ComboBox1.Text);
if (resultIndex > -1) {
MessageBox.Show("Found It");
}
else
{
MessageBox.Show("Did Not Find It");
}
}{
int resultIndex = -1;
resultIndex = ComboBox1.FindStringExact(ComboBox1.Text);
if (resultIndex > -1) {
MessageBox.Show("Found It");
}
else
{
MessageBox.Show("Did Not Find It");
}