List<T>.RemoveAll Doesn't Exist in Silverlight?

Posted by ashes999 on Stack Overflow See other posts from Stack Overflow or by ashes999
Published on 2010-01-25T18:10:32Z Indexed on 2010/06/03 1:34 UTC
Read the original article Hit count: 687

Filed under:
|

I'm working on a Silverlight 2/3 application. I would like to use List.RemoveAll (or maybe it's IList.RemoveAll?) and specify a predicate so that I can remove a bunch of elements from a list in one sweep.

It seems like this function doesn't exist in Silverlight, though. Am I missing something here? Is there an alternative approach that's equally easy? Right now, I'm manually iterating over my elements in a foreach and keeping a second list (because you can't delete while iterating), and it's quite ... cumbersome.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about Silverlight