Hello, I have a list of elements and I want to perform an operation on a
subset of them and then remove them from the list.
If I build a sequence of elements via LINQ to drive the enumeration, as soon
as I remove the first element the enumeration operation is broken.
This surprises me. I thought the LINQ'd sequence would be its own
collection, impervious to changes in the original source collection.
subset of them and then remove them from the list.
If I build a sequence of elements via LINQ to drive the enumeration, as soon
as I remove the first element the enumeration operation is broken.
This surprises me. I thought the LINQ'd sequence would be its own
collection, impervious to changes in the original source collection.
Comment