This question already has an answer here:
Remove items from one list in another
Sorry to post such basic questions, I’m new to LINQ and am trying to figure out the best way to do this short of looping through each
I have 2
ILists<> with of custom dto objects. I want to remove all the matching items from on list that are in the other.
IList<ItemDTO> list1 = itemsbl.GetBestItems(); IList<ItemDTO> list2 = itemsbl.GetWorstItems();
I need to remove all the items in
list2. I have been looking at the
Except() method but apparently i need my
ItemsDTO class to override the
Equals methods for that to work, but i am having trouble finding some examples of this.
Could someone please show me the best way to remove