I have 3 Lists which contains objects of type Book.
Each book has a name and the total amount of that Book.
Is there a way to merge all 3 lists into a new one, where if there are books with the same name in different lists their totals will be added together?
Edit: tried using union and concat but they don’t add the totals together
List<Book> completelist = booklist[0].Concat(booklist[1])
.Concat(booklist[2]).ToList();
Cheers
1 Answer