izza_azhar
Member
- Joined
- Mar 1, 2006
- Messages
- 17
- Programming Experience
- Beginner
anyone know the coding to write an array into list box?
myListBox.Items.AddRange(myArray)
myListBox.DataSource = myArray
jmcilhinney said:Array of what? If it's Strings then either of these will work:The second option will not allow you to add or remove items without changing the DataSource, while the first will allow you to edit the Items collection as you like.VB.NET:myListBox.Items.AddRange(myArray) myListBox.DataSource = myArray