I was just curious about this: the following code will not compile, because we cannot modify a foreach iteration variable:
foreach (var item in MyObj
The point is that you cannot modify the collection itself while iterating over it. It is absolutely legal and common to modify the objects the iterator yields.