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

What is the use of play() playlooping() functions?

628


What is a windows form application?

541


What is dynamic linking?

657


What are the properties of datacontrol?

2034


How will calculated the net amount in tax add like total net amount = LT+ST+CESS+amount 2500 = 10%+12.5%+5.15%+amount? kindly please explain what type of formula we apply in software? Tushar

1906






What is the extension of a compiled help project file?

580


Which property of the progressbar control specifies the amount to increment the current value of the control?

530


What are window applications?

506


Explain something about crystal report in brief?

557


What are the components of gui for windows?

523


What is a windows based application?

539


How many types of dialog boxes windows provides?

590


i already displaying one datagrid. now i want to make change to particular column header i.e i want to split that column header and it includes one more header.... write a code for that in windows application using C#.net

1498


Which dialog box allows users to switch to another area of the application?

571


Explain how to net forms the windows?

573