I have two EmailAddress generic lists, I wanted a simple way of just getting all the EmailAddress objects that are in List1 that aren’t in List2.
I’m thinking a left outer join of some sort with Linq but I’m a little confused on how to set that up. I’m open to a better solution as well.
Update: I should have noted these are custom data type lists of my “EmailAddress” objects.
Most of these answers will not work since the items in List1 and List2 may be equal in the eyes of the user, but are actually references to different instances (they are not reference equal).
Assuming Address is a string property of EmailAddress, here’s a left join solution.