Click to See Complete Forum and Search --> : getting data from a Listbox


cguygo
August 10th, 2004, 01:00 PM
Ok I have a listbox that takes data from the user. I can find everything about a listbox except what I need. I need to get the data in each index of the listbox into a string.
I am using a for loop but after that im stuck...Everything i try has given me problems or just not worked at all.
Can someone point me to or show me an example of grabbing the data from a listbox for further manipulation?
thanks in advance.
guy

Acephalus
August 10th, 2004, 02:16 PM
If I understand correctly, you need listBox1.Items[index].ToString()

cguygo
August 10th, 2004, 02:52 PM
that was it...I appreciate your time in responding...I'm new to C#...about two weeks in. I come from VB and have had alittle trouble with the little things like that.

Thanks again,
Guy

Acephalus
August 10th, 2004, 03:29 PM
No Problem. Welcome to C# :wave: