C# in Depth

Cover of C# in Depth
Order now (3rd edition)

(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 9: Lambda expressions and expression trees

P232, listing 9.3: Missing semi-colon

The first line of listing 9.3 is this:

Func<stringint> returnLength

That's missing a semi-colon. It should actually be:

Func<stringint> returnLength;

P245, section 9.3.5: Typo in sample

The sample code on page 245 is incorrect. It should be this:

T runningTotal = initialValue;
foreach (T item in values)
   runningTotal = Operator.Add(runningTotal, item);

Note the second argument, which should be item, not values.

P254, section 9.5: Typo on last line

On the last line of page 254, "resticted" should be "restricted".