Lambda Expression- Compare list with custom collection

Following example illustrates how to compare the string list with custom collection using Lambda expression

class Program
{
public class First
{
      public string Name
     {
             get;
              set;
   }
}

static void Main(string[] args)
{
List nameList = new List {“Hai”, “Welcome”};
First first = new First
{
Name = “Hai”
};
List firstList = new List
{
first
};

bool result = (firstList.Any(field => nameList.Contains(field.Name)));
if(result)
{
Console.WriteLine(“Name Found in name list…”);
}
}
}