a = 3 7 4 2 8 10
b = 8 3 7 4 2 8
result should 8
How can I achieve the above result while using LINQ? If it is not possible in LINQ then an alternative solution for this
var diff = b.Except(a);
a = 3 7 4 2 8 10
b = 8 3 7 4 2 8
result should 8
How can I achieve the above result while using LINQ? If it is not possible in LINQ then an alternative solution for this
var diff = b.Except(a);
var a = new List<int>(){3 ,7 ,4 ,2 ,8 ,10};
var b =new List<int>() {8 ,3 ,7 ,4 ,2 ,8};
a.ForEach(n1=>b.Remove(n1));
b.ForEach(Console.WriteLine); //8