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
which property is used to change to some value to access a identity column in datacontrols?
What is the extension of the windows installer file?
Name the two main categories of .net components.
Explain the difference between listindex and tab index?
What is formdata?
What are the different cloud platforms?
Which property of the progressbar control specifies the amount to increment the current value of the control?
How to create a set up in vb.net for desktop application please say steps with examples?
Which command prompt utility is used to convert a resource file from the text format into the binary format?
how print barcode
What is form design?
Explain the difference between listbox and combo box?
How insert record in the database?
Name the method that has to be overridden to change the appearance of the control that is inherited from an existing control.
What are the components of gui for windows?