Enumerator problem, Any way to avoid two loops?
Posted
by pug
on Stack Overflow
See other posts from Stack Overflow
or by pug
Published on 2010-06-18T11:04:57Z
Indexed on
2010/06/18
11:13 UTC
Read the original article
Hit count: 262
I have a third party api, which has a class that returns an enumerator for different items in the class.
I need to remove an item in that enumerator, so I cannot use "for each". Only option I can think of is to get the count by iterating over the enum and then run a normal for loop to remove the items.
Anyone know of a way to avoid the two loops?
Thanks
© Stack Overflow or respective owner