The Where<T> extension method can be used where you would use
conditional logic to filter the elements.
var w = new string[]{"Microsoft", "Google", "Yahoo", "Amazon"};
IEnumerable<string> p = w.Where(s => s.Contains('A') && s.Contains('o'));
foreach(string s in p) Console.WriteLine(s);