Help with adding data in listbox using VB.NET

Hi,

How do you add list of data in a listbox by code using VB.NET, for example How do you add the following three rows:

NSN
NSC
FIF

Thanks,

Victor
vcharlesAsked:
Who is Participating?
 
Fernando SotoRetiredCommented:
Hi Victor;

This is how it can be done.
'' Items to be added to the ListBox
Dim items As New List(Of String)() From {"NSN", "NSC", "FIF"}

ListBox1.DataSource = items

Open in new window

0
 
vcharlesAuthor Commented:
Thank You.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.