Just convert your array of elements to List
and then verify presence of text with Any
function from System.Linq
namespace:
// Get text entered by the user
string checkText = "String Text";
if (namelist.ToList().Any(span => span.Text.Contains(checkText)))
{
// List contains text
}
else
{
// List does not contain text
}