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

What is the extension of the windows installer file?

579


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

559


What are the different cloud platforms?

542


Explain how to net forms the windows?

573


What is the synonym of form?

516






What is the difference between desktop application and windows application?

492


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

1901


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

564


What is a fillable form?

513


How to split a column header in gridview using c#.net?

721


What is formdata?

574


Name the method that has to be overridden to change the appearance of the control that is inherited from an existing control.

569


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


What are windows based applications examples?

544


How can you pause a timer control?

639