Preface: I don't understand what this does:
o => o.ID, i => i.ID, (o, id) => o
So go easy on me. :-)
I have 2 lists that I need to join together:
// list1 contains ALL contacts for a customer.
// Each item has a unique ID.
// There are no duplicates.
ContactCollection list1 = myCustomer.GetContacts();
// list2 contains the customer contacts (in list1) relevant to a REPORT
// the items in this list may have properties that differ from those in list1.
/*****/// e.g.:
/*****/ bool SelectedForNotification;
/*****/// may be different.
ContactCollection list2 = myReport.GetContacts();
I need to create a third ContactCollection that contains all of the contacts in list1
but with the properties of the items in list2
, if the item is in the list[2] (list3.Count == list1.Count
).
I need to replace all items in list1
with the items in list2
where items in list1
have the IDs of the items in list2
. The resulting list (list3
) should contain the same number of items at list1
.
I feel as though I'm not making any sense. So, please ask questions in the comments and I'll try to clarify.