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 is the difference between desktop application and windows application?

951


How to get records from a database?

990


How many types of dialog boxes windows provides?

1027


Can you create a tabletype of recordset in Jet - connected ODBC dbengine?

2240


Name the property which is used to specify the source from where the crystal reports would be accessed.

934


how print barcode

2483


What are windows based applications examples?

986


What is the extension of a compiled help project file?

1076


Which method of the messagebox class is used to display a message in the message box?

951


How to create a set up in vb.net for desktop application please say steps with examples?

922


What is form technology?

896


How save rerecord in the database?

990


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

948


What is form based application?

915


Where to use new keyword other than create instance?

1080