C# in Depth

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

Typo in sample

Chapter 9: Lambda expressions and expression trees: P245, section 9.3.5

Created: 8/9/2011
Last updated: 8/9/2011
Severity: Typo

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.