In C# trying to do an Except between two lists of strings. There are some diff's, see the image below. At idx 2 and 19 note these are not the same. yet the List.Except method is only returning the last difference.
I call it like this: var x = expList.Except(actList);
Returns 1 item in the result: "site".
I expect 2 items: 4001, "site"
Anyone have any ideas as to what's going on here?
Thanks!
As Alexei Levenkov mentioned, Enumerable.Except
is not a "symmetric difference".
Consider:
new HashSet<string>(expList).SymmetricExceptWith(actList);