I'm trying to compare three lists and from these lists, trying to find the unique element.
As an example:
List A: 1
List B: 1, 2
List C: 1, 2, 3
As a result, element "3" should be stored.
What I have attempted by looking at previous questions and expanding on is:
Dim result1 As List(Of Long) = A.Except(B).ToList()
Dim result2 As List(Of Long) = C.Except(result1).ToList()
The issue I face is my lists could be as such:
List A: 1
List B: 1
List C: 1, 2
As a result, result1 will store 0 which compares to list C and were then storing in result2: 1 and 2
Is it possible to compare three lists simultaneously? The except document on Microsoft states 2 lists only. Alternatively I could just do a pre check to see if A and B are the same and not to compare them but rather do a 3 way comparison.