c# remove from list in foreach

C#
myList.RemoveAll(x => x.SomeProp == "SomeValue");
Source

Also in C#: