I have a list of strings called TheListOfFruits "apple", "banana", "peach"
I have a string called TheFullString = "thebasketofapples"
I want to know if TheFullString has parts of it contained in TheListOfFruits
For now, this is what I do:
foreach(string s in TheListOfFruits)
{
if (TheFullString.Contains(s) == true)
{
return;
}
}
So in this case, "thebasketofapples" contains "apple"
Is there a nice Linq-way to write this?