Tag Archives: Collections

How to Deal With “Collection was modified; enumeration operation may not execute.” Error

When performing operations on collections, you may get the following exception: “Collection was modified; enumeration operation may not execute.” You will get this error if you are adding to and removing items from a collection in loops and, surprisingly, when … Read More »»»

Posted in C# | Tagged , , , , , , , | Leave a comment