I've got two collections (generic Lists), let's call them ListA and ListB.
In ListA I've got a few items of type A. In ListB I've got some items of type B that have the SAME ID (but not same type) as the items in ListA, plus many more. I want to remove all the items from ListB that have the same ID as the ones in ListA. What's the best way of doing this? Is Linq to objects a nice fit? What algorithm would you use?
Example
ListA: ItemWithID1, ItemWithID2¨
ListB: ItemWithID1, ItemWithID2, ItemWithID3, ItemWithID4
EDIT: I forgot to mention in my original question that ListA and ListB doesn't contain the same types. So the only way to compare them is through the .Id property. Which invalidates the answers I've gotten so far.