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 dynamic linking?
Which method of the messagebox class is used to display a message in the message box?
Is form action required?
What are controls in windows forms?
Name the event that enables the user to prevent shifting of focus from control until all the validation rules have been met.
Suppose I am implementing one windows form. I am inserting some values into ms access. In that table 5 columns there. But I want to insert three columns only. When I am clicking another button then other two values also insert into that table?
Name the property which is used to specify the source from where the crystal reports would be accessed.
How to use the FindControl() function to preselect an item in my dropdownlist?
What is the full form of gac?
Explain how barcode create in the report?
What is the extension of a compiled help project file?
What is the use of form?
What is the extension of the windows installer file?
how print PGL by XML
Which template creates a .net compact framework 2.0 forms application for pocket pc 2003 and later?