Click here to Skip to main content
15,921,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Thanks in advance,

Is there way to pass combo box list of object directly like:
VB
 Dim mlist As New List(Of String)
        mlist.Add("A")
        mlist.Add("B")
        mlist.Add("c")
        mlist.Add("d")
cbo.items.add (mlist)
Posted
Updated 6-Jun-12 21:34pm
v2

try:
VB
cbo.Items.AddRange(mlist.ToArray())


[edit]Forgot that AddRange only accepts an array and not an IEnumerable :O - OriginalGriff[/edit]
 
Share this answer
 
v2
Comments
VJ Reddy 7-Jun-12 3:40am    
Good answer. 5!
 
Share this answer
 
Comments
VJ Reddy 7-Jun-12 3:40am    
Good answer. 5!
Maciej Los 7-Jun-12 3:45am    
Thank you, VJ ;)
Prasad_Kulkarni 7-Jun-12 3:43am    
My 5!
Maciej Los 7-Jun-12 3:46am    
Thank you, Prasad ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900