List<int> arr1 = new List<int>() { 1, 2, 3, 4 }; List<int> arr2 = new List<int>() { 4, 5, 6, 7 }; var arr3 = arr1.Intersect(arr2).ToList(); var arr4 = arr1.Except(arr2).ToList();
List<int> arr1 = new List<int>() { 1, 2, 3, 4 }; List<int> arr2 = new List<int>() { 4, 5, 6, 7 }; var arr3 = arr1.Intersect(arr2).ToList(); var arr4 = arr1.Except(arr2).ToList();