I have an object which is contained within a List<>, I need to remove these from another List<>
e.g.
List<MyObject> AllElements = new List<MyObject>();
List<MyObject> SearchResults = new List<MyObject>();
... Do something so that SearchResults contains a subset of the objects contained within AllResults
Currently I do this to delete them from the main list:
for(int i = 0; i < SearchResults.Count; i++)
AllElements.Remove(SearchResults[i]);
Is there an nicer [linqier!] way?