If you’ve got LINQ available to you, you can use Except and Distinct. The sets you asked for in the question are respectively:
- array2.Except(array1)
- array1.Except(array2)
- array1.Intersect(array2)
If you’ve got LINQ available to you, you can use Except and Distinct. The sets you asked for in the question are respectively:
- array2.Except(array1)
- array1.Except(array2)
- array1.Intersect(array2)