Errata

I’ll add errata to this post. There hasn’t been much, fortunately.

From Chuck Spahr, one of the authors:

On the first page of the chapter, p. 135, the second item in the In This Chapter list says “Implementing a LinkedList collection” but that implementation has been taken out of the chapter. On that same page, the second list item is “‘Enumerating,’ or iterating, LinkedList. Same issue as first item above.

The LinkedList was taken out after the leading section on iterating a directory of files.  But on page 141, the section “Iterating foreach collections: Iterators,” the example is that LinkedList again.

From J.W

Page 78 recommends using Double.Epsilon. I hadn’t come across this before so I did some further reading. The following link is a discussion that implies that under some conditions use of Double.Epsilon can be inaccurate due to some circumstances where the compiler uses the 80 bit register and and some where it uses the 64 bit one. The detail is outside of the scope of the book but one of the contributers recommended using a known small number instead of Double.Epsilon. This seemed to me to be a better solution (but I could well be worng)    http://bytes.com/topic/c-sharp/answers/253204-meaning-double-epsilon
From R.B.
On page 64 in the description of the RemoveWhiteSpace program, the text incorrectly identifies which pass does what. You start with a string “ this is a\nstring”.  The text describes the passes made on the string and says the third pass removes the newline and the fourth returns a -1.  I believe there is actually a fifth pass . The third pass would actually remove the space between “is” and “a” and the fourth pass would deal with the newline.

Passes are:

1.       Leading space

2.       Space between “this” and “is”

3.       Space between “is” and “a”

4.       Newline

5.       Return -1
From G.B.
I’m sure page 344 in the Student constructor it should be:
 
public Student(string name, double grade)
{ Name = name; Grade = grade; }
 
not:
 
public Student(string name, double grade)
{ Name = Name; Grade = grade; }
From W.A.S.
The conversions from int to string in the Graphics example in Book 3 Chapter 5 are faulty. Thoughout I say
(int)variable.ToString();
but it should be
Int32.Parse(variable.ToString();

Short URL for this post: http://tmblr.co/ZbT_bx943n22