List Info

Thread: Enumerating Collections Whilst Removing Items




Enumerating Collections Whilst Removing Items
user name
2006-06-03 05:37:03
I have a requirement whereby I have a list of objects within
a collection
Dictionary<> I'm using a foreach to iterate over the
collection. However if
I find a certain element within the collection I need to
remove items in the
collection which haven't been reached yet.



The object that I find can identify related data I need to
remove the
related data on certain conditions.



Any pointers?

Robert.


===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )