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 / mona

For inti As Integer = 0 To ComboBox1.Items.Count
For intj As Integer = 0 To ComboBox2.Items.Count
If ComboBox1.Items(inti).ToString =
ComboBox2.Items(intj).ToString Then
MessageBox.Show(ComboBox1.Items(inti))
End If
Next
Next


The answer should be modified. The loop should not go upto
the count-1 but should go upto count. Rest all is OK.

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the need of z-order method?

520


Name the two main categories of .net components.

536


What are windows applications?

499


What is window form application?

506


What are window based applications?

527






Which method grants a lock on a resource?

579


What is the full form of gac?

650


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

585


Which property of the errorprovider control automatically sets to the form to which?

554


What is the difference between the add() and insert() methods of a listbox control?

590


What is a windows forms application?

521


What are the different cloud platforms?

542


How to get records from a database?

595


How is anchoring different from docking?

600


How to split a column header in gridview using c#.net?

725