The "Where" extension method above is an
example of compiling a Lambda expression to a code
delegate (meaning it compiles down to IL that is callable in the form of a
delegate). The "Where()" extension method to support filtering
any IEnumerable collection like above could be implemented using the
extension method code below:
Listing 6

The Where() extension method above is
passed a filter parameter of type Func<T, bool>, which is a delegate that
takes a method with a single parameter of type "T" and returns a boolean
indicating whether a condition is met. When we pass a Lambda expression
as an argument to this Where() extension method, the C# compiler will compile
our Lambda expressions to be an IL method delegate (where the
<T> type will be a Person) that our Where() method can then call to
evaluate whether a given condition is met.