0

here is my problem ...

I have a bunch of usernames in a listbox called listBox1, how can i store each line of text into a mulitiple arrays of a string?

i cant seem to figure it out


I want to do this so later i can use "usernames[x]" so i can output every line with a for loop


im really stuck, ive searched on the internet for hours before posting for help here, hope i can find it


any help is greatly appreciated

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by blindkilla
0

Why not store all the usernames in an array to begin with, then bind that Listbox to the array as a datasource? Then you already have a data structure there to work with.

Or alternatively, the ListBox should have an Items property that you can iterate through, pretty much just like you're using an array already. You could do Items[x].Value , if I recall correctly. No need for a separate array there.

0

Thank you so much!!
i used

listBox1.Items[x].ToString()

and it worked :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.