Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By Corrected
Printed Page 9
Middle of page

static int InchesToFeet (int feet) {...}

should read

static int FeetToInches (int feet) {...}

Anonymous  Apr 2009
Printed Page 86
near the top of the page


The page now ends with "for example:" followed by no example. Here are the 6 lines that should follow:


class BaseClass { protected virtual void Foo() {} }

class Subclass1 : BaseClass { protected override void Foo() {} } // OK

class Subclass2 : BaseClass { public override void Foo() {} } // Error

The compiler prevents any inconsistent use of access modifiers. For example, a subclass itself can be less accessible than a base class, but not more accessible:

internal class A {}

public class B : A {} // Error

Anonymous  Apr 2009
Printed Page 95
4th line

{95} 4th line, change

Console.WriteLine (typeof(BorderSide), Enum.IsDefined (side)); //False

to

Console.WriteLine (Enum.IsDefined (typeof(BorderSide), side)); //False

Anonymous  Apr 2009
Printed Page 171
table 6-1

[3/08 printing]

in the 2nd column of the IsWhiteSpace row and the IsControl row, control characters using incorrect syntax: "/n" should be "\n", etc

Note from the Author or Editor:
In the 2nd column of the IsWhiteSpace and IsControl rows, replace all forward slashes (/) with backslashes (\)

Anonymous  Apr 2009
Printed Page 266
2nd line

if (Zoo != null) Zoo.NotifyNameChange(this, value);

should bee:

if (Zoo != null) Zoo.Animals.NotifyNameChange(this, value);

Anonymous  Apr 2009
Printed Page 283
Figure 8-2 and inside back cover


There's an error in Figure 8-2 on page 283 - which is also reproduced on the back cover. There's an extra line betweeen the select and group-clause boxes which shouldn't be present.

Here's how it should look:
http://www.albahari.com/nutshell/linqsyntax.aspx

Anonymous  Apr 2009
Printed Page 314
1/4 way down from top of page

In code sample 1/4 down the page,

cust.Purchases.Remove(p2)

should read:

cust.Purchases.Add(p2)

Note from the Author or Editor:
A correction was submitted for the third printing.

Anonymous  Aug 2008
Printed Page 314
1/2 way down page

Need to change "100" to "1".

Sentence:

"In this example, LINQ to SQL automatically writes 100 into the CustomerID column... "

Should read:

"In this example, LINQ to SQL automatically writes 1 into the CustomerID column... "

Anonymous  Aug 2008
Printed Page 315
First code sample near top of page

The line:

Customer cust = dataContext.Customers.Single(c => c.ID == 1);

is superfluous. It does not need to be there and should be deleted.

Note from the Author or Editor:
Confirmed: delete first line in that code listing (top of page 315) as described.

Anonymous  Aug 2008
Printed Page 324
Filtering Method Table, Middle of page

The descriptions for the methods 'TakeWhile' and 'SkipWhile' both state [Emits|Ignores] elements from the input sequence until the predicate is true

This is incorrect, they operate while the predicate is true, and operate until the predicate is false.

From MSDN on TakeWhile:

http://msdn.microsoft.com/en-us/library/bb534804.aspx

"Returns elements from a sequence as long as a specified condition is true."

The examples on page 327 also make the operation clear.

The problem is that the operations continue WHILE the predicate is true, rather than UNTIL. To use until, you would have to state they continue until false, which is awkward.

They should be reworded, as their function name suggests, to say they perform their action WHILE the predicate is true.








Note from the Author or Editor:
Table, half way down page 324:
- In the middle column ("Description") of TakeWhile, change "until" to "while" so that it reads "Emits elements from the input sequence while the predicate is true"
- In the middle column ("Description") of SkipWhile, change "until" to "while" so that it reads "Ignores elements from the input sequence while the predicate is true, and then emits the rest"

Similarly, half way down page 327, change "until" to "while" in the first and second sentences under section "TakeWhile and "SkipWhile".

Anonymous  Apr 2009
Printed Page 436
top of page

In the last sentence of note at the top of the page, "setion" should be "section".

Anonymous 
Printed Page 442
Second bullet under the heading, "Named pipes"

In the sentence, "The client instantiates a NamedClientStream and then calls Connect (with an optional timeout)", "NamedClientStream" should say "NamedPipeClientStream".

Fred Sawtelle 
Printed Page 564
9th line

Page 564, 9th line

Change:

Console.WriteLine(t);

To:

Console.WriteLine(t.FullName);

Anonymous  Apr 2009
Printed Page 564
2nd line from the bottom

the output of Console.WriteLine(t.FullName) should be:

// System.Environment+SpecialFolder

instead of:

// System.Environment+StringBuilder

Anonymous  Apr 2009
Printed Page 569
Middle of page

In the sentence

"...whereas RefectedType returns the subtype."

RefectedType should read ReflectedType

Anonymous 
Printed Page 587
Passing Arguments to a Dynamic Method section, 4th line

Page 587, Passing Arguments to a Dynamic Method section, 4th line

Change:

when calling DefineMethod.

to:

when calling DynamicMethod constructor.

Note from the Author or Editor:
Change:

when calling DefineMethod.

to:

when calling DynamicMethod's constructor.

Anonymous 
Printed Page 587
Passing Arguments to a Dynamic Method section, 4th line

Page 587, Passing Arguments to a Dynamic Method section, 4th line

Change:

when calling DefineMethod.

to:

when calling DynamicMethod constructor.

Note from the Author or Editor:
Change:

...when calling DefineMethod.

to:

...when constructing the DynamicMethod.

Anonymous  Apr 2009
Printed Page 600
Attaching Attributes section, 5th-to-last line

Page 600, Attaching Attributes section, 5th-to-last line

Change:

new object[] { "FirstName", 3 } // Property values

To:

new object[] { "http://test/", 3 } // Property values

Anonymous 
Printed Page 600
Attaching Attributes section, 5th-to-last line

Page 600, Attaching Attributes section, 5th-to-last line

Change:

new object[] { "FirstName", 3 } // Property values

To:

new object[] { "http://test/", 3 } // Property values

Note from the Author or Editor:
Good spot.

Anonymous  Apr 2009
Printed Page 601
Second code snippet, 2nd-to-last line

Page 601, second code snippet, 2nd-to-last line

Change:

gen.Emit(OpCodes.Ldarg_1);

To:

gen.Emit(OpCodes.Ldarg_0);

Anonymous 
Printed Page 601
Second code snippet, 2nd-to-last line

Page 601, second code snippet, 2nd-to-last line

Change:

gen.Emit(OpCodes.Ldarg_1);

To:

gen.Emit(OpCodes.Ldarg_0);

Note from the Author or Editor:
The line to change is about 2/3 way down the page. It should read:

gen.Emit (OpCodes.Ldarg_0);

And to whoever reported this, well-spotted!

Anonymous  Apr 2009
Printed Page 651
The first sentence of the last paragraph

Instead of "The final argument to BeginInvoke is a user state object that populates the AsyncResult property of IAsyncResult." it should be "The final argument to BeginInvoke is a user state object that populates the AsyncState property of IAsyncResult.".

Please note "AsyncState" instead of "AsyncResult".

Alexey Shestialtynov  Apr 2009
Printed Page 710
First paragraph

A method is incorrectly referred to as "AppDomain.UnloadDomain". It should read "AppDomain.Unload".

Eric Bank 

See larger cover


LINQPad Webinar
Recent Forum Posts

"I absolutely love what the Albahari brothers (Joe & Ben) have done with C# 3.0 in a Nutshell...It's pure genius and if I ever write another book, it's a model I'm going to follow. Very highly recommended."
--Chris Sells, Sells Brothers