I have a an array of strings:e.g:
string [] names ={"P","A","B","G","F","K","R"}
I have another array :
string [] subnames={"P","G","O"}
How can we check whether names array has any elements of subnames array.
In the above example "P" and "G" are there in names.
Linq is the simplest I think:
from n1 in names join n2 in subnames on n1 equals n2 select n1;