Reply to comment

Your reply

You need to sign up / log in to reply to this comment

Existing comment

Nice simple article.

I would like to add the Lambda equivalent for:

foreach(var item in list.ToList())
        list.Remove(item);    //Will work!

which would be:

list.RemoveAll(listitem => some_condition);

Thanks for commenting

Please remember:
Be polite, helpful and keep a positive attitude
Keep it short
Use examples
Review spelling and grammar

Please avoid:
Long texts
Code that is untested
Wall of text