Query
public void Linq67()
{
string[] words = { "believe", "relief", "receipt", "field" };
bool iAfterE = words.Any(w => w.Contains("ei"));
Console.WriteLine("There is a word that contains in the list that contains 'ei': {0}", iAfterE);
}
Lambda Expression
public void Linq67()
{
string[] words = { "believe", "relief", "receipt", "field" };
bool iAfterE = words.Any(w => w.Contains("ei"));
//DONE fixed typo in writeline
Console.WriteLine("There is a word in the list that contains 'ei': {0}", iAfterE);
}
Output
There is a word that contains in the list that contains 'ei': True