i think this question has been asked before but i havent been able to deduce a clear answer. I am trying to find the best way (or a way) to intersect two completely differen
By using the intersect method, you can get common members between the two enumerables, like this example demonstrates:
[Test] public void TestObjectIntersect() { var a = new List { 1, 2, 3, "test", "test2" }; var b = new List { 4, 5, 1, "test2" }; var c = a.Intersect(b); Console.WriteLine(String.Join(",", c.Select(x => x.ToString()).ToArray())); }