I have a popuplated IEnumerable collection.
IEnumerable
I want to remove an item from it, how can I do this?
foreach(var u in users) {
You can't. IEnumerable can only be iterated.
In your second example, you can remove from original collection by iterating over a copy of it
foreach(var u in users.ToArray()) // ToArray creates a copy { if(u.userId != 1233) { users.Remove(u); } }