I'm using VB.NET with .NET 2.0.
I have two lists, and I want to compare the lists on a specific property in the object, not the object as a whole, and create a new list that contains objects that are in one list, but not the other.
myList1.Add(New Customer(1,"John","Doe")
myList1.Add(New Customer(2,"Jane","Doe")
myList2.Add(New Customer(1,"","")
Result in the above example would contain one customer, Jane Doe, because the identifier 2
wasn't in the second list.
How can you compare these two List<T>
or any IEnumerable<T>
in .NET 2.0 (lacking LINQ)?