c# collection was modified enumeration operation may not execute code example
Example: c# remove Collection was modified; enumeration operation may not execute.
for(int i = list.Count - 1; i >= 0; i--) {
if({some test}) list.RemoveAt(i);
}
for(int i = list.Count - 1; i >= 0; i--) {
if({some test}) list.RemoveAt(i);
}