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.
Here is a Linq solution that should give you what you need: