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 / pavel
bool found = false;
string item = string.Empty;
foreach (string item1 in comboBox1.Items)
{
foreach (string item2 in comboBox2.Items)
if (item1 == item2)
{
item = item1;
found = true;
break;
}
if (found) break;
}
MessageBox.Show(found ? item : "Not found");
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How is anchoring different from docking?
Explain about crystal report in brief?
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
Which property of the errorprovider control automatically sets to the form to which?
What is form based application?
What are the forms of graphics?
Name the property which is used to specify the source from where the crystal reports would be accessed.
Explain the need of z-order method?
What is form description?
Name the property which of menu cannot be set at run time?
Explain the difference between listbox and combo box?
Explain something about crystal report in brief?
Explain how many number of events does the timer controls?
What are window based applications?
how see report periviwe