linq Except
linq Except
public static void Except() { int[] numbersA = { 0, 2, 4, 5, 6, 8, 9 }; int[] numbersB = { 1, 3, 5, 7, 8 }; IEnumerableThe returned the uncommon elements from the two array.aOnlyNumbers = numbersA.Except(numbersB); Console.WriteLine("Numbers in first array but not second array:"); foreach (var n in aOnlyNumbers) { Console.WriteLine("{0}", n); } }
Output
Linq Set Operators
linq Except
Reviewed by Bhaumik Patel
on
6:49 PM
Rating: