I am stucked in a situation where I am having two lists. What will be the correct way to compare the two and get the result in third list. But here is a small catch. See example below:
ListOld = { [Name=Amit, Class=V, Roll=3], [Name=Naveen, Class=V, Roll=3], [Name=Sammy, Class=V, Roll=3], [Name=Neil, Class=X, Roll=21], [Name=John, Class=VI, Roll=63]}; ListNew = { [Name=Amit, Class=VI, Roll=13], [Name=Naveen, Class=VII, Roll=3], [Name=Sammy, Class=V, Roll=3], [Name=Sanjay, Class=VIII, Roll=2]}; ResultantList = { [Name=Amit, Class=VI, Roll=13], [Name=Naveen, Class=VII, Roll=3], [Name=Sanjay, Class=VIII, Roll=2]}; In above example, ListNew has got 3 changes, that are updates in Amit and Naveen , and Sanjay as a new member.
So In my query I need to compare both the list and want to pick either updated or added item in first list.
I tried, Except(), Intersect(), union(), with Equality Interfaces but no success. Kindly help.