Short Answer: You do not.
Long Answer: foreach does not work with collections, it only works with Enumerators. Luckily every collection and their dog can be converted into a Enumerator. It just did that implicitly without you even noticing it.
However one standing rule of Enumerators that should always be followed is: if the underlying collection changes, the Enumerator must become invalid.
https://learn.microsoft.com/en-us/dotnet/api/system.collections.ienumerator?view=netframework-4.8
"If changes are made to the collection, such as adding, modifying, or deleting elements, the behavior of the enumerator is undefined. "
And just to be certain to not cause any issues, most Enumerators just throw an Exception.
Edit: Linq Solutions
The Linq Solutions posted by others get around that. While it propably uses a foreach (IIRC the linq expression actually is a enumerator), it does not change the list. It just creates a new list with the elements you filtered for. None of the headache, but linq can cause memory issues in extreme or fringe cases (large lists, webapplications) - just in case you need to mind your memory profile.