How to find whether a string array contains some part of string? I have array like this
String[] stringArray = new [] { "[email protected]", "[email protected]", "@gmail.com" };
string str = "[email protected]"
if (stringArray.Any(x => x.Contains(str)))
{
//this if condition is never true
}
i want to run this if block when str contains a string thats completely or part of any of array's Item.