I have two combobox .. and i have some items in both combobox
now i need to check the item in both combobox if same item
is Present in both combobox i need to display that item in
message box

Answer Posted / atiullah siddique

for (int i = 0; i <= comboBox1.Items.Count-1; i++)
{
for (int j = 0; j <= comboBox2.Items.Count-1; j++)
{
if (comboBox1.Items[i].ToString() == comboBox2.Items
[j].ToString())
MessageBox.Show(comboBox1.Items[i].ToString());
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the property which of menu cannot be set at run time?

662


Explain about crystal report in brief?

554


How to create a set up in vb.net for desktop application please say steps with examples?

529


What are windows based applications examples?

542


Explain how to net forms the windows?

572






Which property of the errorprovider control automatically sets to the form to which?

551


What is a windows form application?

537


What is a windows based application?

535


Which event occurs when a user drags an item in a treeview or listview control?

561


Is windows an application software?

519


Explain how to get records from a database?

649


Explain the difference between listbox and combo box?

508


What is the difference between a document and a form?

535


What is the use of form?

529


how barcode print on the win form

2010