How can we check whether one array contains one or more elements of another array in #?
Here is a Linq solution that should give you what you need:
names.Any(x => subnames.Contains(x))
The absolute simplest way would be to use the Enumerable.Intersect method. Then us the Any method on the result
bool containsValues = names.Intersect(subnames).Any();
This will work too:
bool result = names.Any(subnames.Contains);
EDIT
This code may look incomplete but it actually works (method group approach).