Arrays

joem

New member
Joined
Feb 23, 2006
Messages
2
Programming Experience
Beginner
I just started learning VB.NET and im trying an example in arrays but for some reason I get an error message everytime it gets to the section where it needs to add it to the list box..

error message is value cannot be NULL.

Here is my code...this is simple stuff but I cant get it

Dim friends(4) As String
friends(0) = "1"
friends(1) = "2"
friends(3) = "3"
friends(4) = "4"

Dim name As String
For Each name In friends
lstFriends.Items.Add(name)
Next
 
How about posting what you found and how you fixed it for the next person that comes along with the same problem? Also, could you put RESOLVED in the title so that we know it's closed out (hint, edit your first post in the thread and edit the Topic Title.)

-tg
 
Back
Top