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 are the three states set in a checkstate property?
Explain how many number of events does the timer controls?
How many navigational features are provided by visual studio.net ide?
Explain the need of z-order method?
How many types of dialog boxes windows provides?
how print PGL by XML
What is form and meaning?
Which property value of the helpnavigator property will display the index for a specified topic?
What is the difference between a document and a form?
Name the class to be inherited for creating a custom control.
What is form application?
Is typeform free?
Which dialog box allows users to switch to another area of the application?
Which method of the messagebox class is used to display a message in the message box?
What is the use of runworkasync() methods?