Remove Items from List Box

L

Lit

Hi,

what is the best way of removing multiple items from a list box found in
another list box.

Foreach does not allow you to modify itself

Looping through has index issues.

Other than copying to new instance what gives?

thanks,

Lit
 
S

Scott M.

Inline...


Lit said:
Hi,

what is the best way of removing multiple items from a list box found in
another list box.

Foreach does not allow you to modify itself

Why not?
Looping through has index issues.

Only that you have to use 2 indexes.
Other than copying to new instance what gives?

Nothing, it just sounds like you don't want to do what is needed.
 
L

Lit

Hi Scott,

You don't understand at all, or have no clue what the problem is.
Try a foreach and delete from the collection itself. It does not work.

It looks like the selected item approach will do it

thank you for your time

Lit
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top