Suppose that I've two list:
foo1<T>
foo2<T>
each list have as property Id that's an int, I need to check if all the ids of list foo1 are equal to list foo2, what I did:
foo1.Where(x => foo2.Any(z => z.Id != x.Id)).Any();
so essentially if all Ids value of each item are equal should return false, if almost one is different should return true.
Both list are already ordered.
Actually i get even true, but it should return false 'cause all my items Ids are equal.
What am I doing wrong?
Thanks.