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
What is the difference between desktop application and windows application?
How to get records from a database?
How many types of dialog boxes windows provides?
Can you create a tabletype of recordset in Jet - connected ODBC dbengine?
Name the property which is used to specify the source from where the crystal reports would be accessed.
how print barcode
What are windows based applications examples?
What is the extension of a compiled help project file?
Which method of the messagebox class is used to display a message in the message box?
How to create a set up in vb.net for desktop application please say steps with examples?
What is form technology?
How save rerecord in the database?
Which of the following position is the default docking position of the statusstrip control on the form?
What is form based application?
Where to use new keyword other than create instance?