Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the different cloud platforms?

1017


Name the class to be inherited for creating a custom control.

1039


What is window form application?

1003


how barcode print on the win form

2467


Name the property which of menu cannot be set at run time?

1121


What is a windows based application?

1038


Is windows an application software?

1060


Which command prompt utility is used to convert a resource file from the text format into the binary format?

1121


Which of the following position is the default docking position of the statusstrip control on the form?

1048


Explain how to find the current record position in data control?

977


Name the property which is used to lock a textbox to enter data?

1147


What is a windows forms application?

1045


How to show a ContextMenuStrip instead of cthe default ContextMenuStrip,when you rightclick on the non client area of a window's Form or when alt+space keys are pressed

2286


Which dialog box allows users to switch to another area of the application?

1096


Explain how barcode create in the report?

1041