Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Remove Items from List Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lit - 27 Jul 2007 01:09 GMT
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
Scott M. - 27 Jul 2007 02:04 GMT
Inline...

> 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.
Lit - 27 Jul 2007 16:22 GMT
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

> Inline...
>
[quoted text clipped - 14 lines]
>
>    Nothing, it just sounds like you don't want to do what is needed.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.