Add to ArrayList

G

Guest

Hello. I wish to add the selectedItems in a listbox to an arrayList, so I
can loop through the arrayList and perform some processing. Any ideas how I
can add selected Items to arrayList?
 
M

Michael C

Toco said:
Hello. I wish to add the selectedItems in a listbox to an arrayList, so I
can loop through the arrayList and perform some processing. Any ideas how
I
can add selected Items to arrayList?\

ArrayList arr = new ArrayList(listBox1.Items);

or loop through the items and add one at a time to the arraylist.
 
G

Guest

thanks that got me what I needed

Michael C said:
ArrayList arr = new ArrayList(listBox1.Items);

or loop through the items and add one at a time to the arraylist.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top