I have a C# application. I have two lists ('NewStock' and 'OldStock') of the same custom type, 'Book'. I want to extract any 'Book' object that is the list NewStock but not in the OldStock list into a new list called ResultList. Please see an example below. How do I do this?
I have used implemented the IEqualityComparer interface on my class Book so that I check if a book object is equal to another.
NewStock OldStock
A A
B C
C
D
Result I would like,
ResultList
B
D