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 / kirupa

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 ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the need of z-order method?

518


Which property is used to specify the use of an element in the user interface and reports it to the accessibility aids?

555


Explain how to add resources during runtime?

607


Is typeform free?

516


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

662






Which template creates a .net compact framework 2.0 forms application for pocket pc 2003 and later?

561


how print PGL by XML

2619


Where to use new keyword other than create instance?

663


What is the full form of gac?

644


Which window displays messages for the status of various features provided in the visual studio .net ide?

555


What is an example of form?

567


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

551


Can you create a tabletype of recordset in Jet - connected ODBC dbengine?

1877


What are the forms of graphics?

513


What are window based applications?

525