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
Explain about crystal report in brief?
What is the advantage of a form?
how print barcode
Which template creates a .net compact framework 2.0 forms application for pocket pc 2003 and later?
Suppose 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?
What is difference between winforms and windows forms?
What is dynamic linking?
To which namespace does the control class belong?
Explain the new events in textbox that has been included in vb?
Is typeform free?
What are the forms of graphics?
What are the properties of datacontrol?
Where is system windows forms dll?
What is a database form?
How is anchoring different from docking?