i have an object called Person. It has properties First, Last, Age, etc . . .
I have two arrays of Person objects.
I want to have some function to take two arrays
Person[] firstlist = . .
Person[] secondList = . .
and have it spit out two new arrays
Person[] peopleinFirstListandNotSecond
Person[] peopleinSecondListandNotFirst
Since these are not string arrays, i would want to do a compare on first and last name and age to determine if its the same person
Here is a linq function (IEnumerable<T>.Except(...)) that will do what you need.
http://msdn.microsoft.com/en-us/library/bb336390.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With