(You are currently looking at the second edition version of this page. This page is also available for the third and first editions.)

Errata for Chapter 11: Query expressions and LINQ to Objects

P304, section 11.5.1: Incorrect method signature for Join

The method signature for Join is incorrect. The fourth parameter should use TInner rather than Inner, giving a signature like this:

static IEnumerable<TResult> Join<TOuter,TInner,TKey,TResult>(
    this IEnumerable<TOuter> outer,
    IEnumerable<TInner> inner,
    Func<TOuter,TKey> outerKeySelector,
    Func<TInner,TKey> innerKeySelector,
    Func<TOuter,TInner,TResult> resultSelector

P305, section 11.5.1: Missing "a"

The top few lines of page 305 contain:

and creates an anonymous type and simple mapping to use for the resultSelector parameter

This would perhaps be better with an extra "a":

and creates an anonymous type and a simple mapping to use for the resultSelector parameter

P310, section 11.5.3: Typo in SelectMany signature

In the signature of SelectMany, I refer to a mysterious generic IEnumerable type with two arguments for some reason... the correct signature should be:

static IEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(
    this IEnumerable<TSource> source,
    Func<TSource,IEnumerable<TCollection>> collectionSelector,
    Func<TSource,TCollection,TResult> resultSelector

P317, first paragraph: Incorrect section reference

In the first paragraph on page 317, I refer to a defect-tracking query in section 10.3.4. However, the query actually occurs in section 10.3.6.