string[] names = new string[] {"test1", "test2"}; Predicate<string> longWords = delegate(string word) { return word.Length > 4; }; int numberOfBooksWithLongNames = names.Count(longWords);
Predicate<string>
Func<string, bool>
Count
public static int Count<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)