Given 2 int arrays e.g, foo and bar, what\'s the most efficient way to check that the array bar contains at least one item that foo contains. should re
foo
bar
Another solution:
var result = array1.Any(l2 => array2.Contains(l2)) == true ? "its there": "not there";
If you have class instead of built in datatypes like int etc, then need to override Override Equals and GetHashCode implementation for your class.
Equals
GetHashCode