CLR via C#

Errata for CLR via C#




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 "Date 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 Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF
Page VII
The whole Table of Contents

All entries of the ToC are pdf-internal links (which can be followed via click) but all of them lead to the first page and not, as expected, to the corresponding chapters / pages. This happens in Acrobat Reader (mac and windows), Mac OS X Preview and also on iOS's iBooks application - so basically they -are- broken. Manually pagination is required and actually quite cumbersome. Submitted this problem already via e-mail but as I stumble over this over and over again I wanted to utilize the official errata submit form here, too. Best regards and thanks, -Jörg B.

Joerg Battermann  Jan 27, 2013  Mar 08, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page vi
Last section

In Contents at a Glance. On page vi it says Par V instead of Part V.

Bhavesh  Jan 29, 2013  Mar 08, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 10
Table 1-2 Effects of /platform on Resulting Module and at Run Time

I have some doubts about the new anycpu32bitpreferred option. I guess the result is the same as the x86 option when running on x64 Windows. In my understanding the only difference is that it allows these assemblies to also run on ARM Windows RT. So in table 1-2 in column "x64 Windows" it should read "Runs as a WoW64 application" instead of "Runs as a 32-bit application". In my understanding 32-bit application always run as WoW64 applications on x64 Windows.

Anonymous  Feb 21, 2013  Mar 08, 2013
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 94
code comment

A Manager IS-A Object: PromoteEmployee runs OK. should be: A Manager IS-A Employee: PromoteEmployee runs OK.

Zhou Jing  Jan 12, 2013  Mar 08, 2013
Printed
Page 128
antepenultimate paragraph in code snippet

IL code comment: In32 instead of Int32

Note from the Author or Editor:
Correct. In the 3rd comment from the bottom of the page, "In32" should be "Int32"

Sven Knödler  May 01, 2013  May 15, 2013
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 145
code at bottom of page

Object o1 = 123; Int32 n1 = o; Int32 n2 = (Int32) o; o should be o1

Zhou Jing  Jan 20, 2013  Mar 08, 2013
Printed
Page 162
Table 6-2

Should the last three cells of the last row be merged?

Note from the Author or Editor:
Yes, the last row should space the 3 columns.

Anonymous  Mar 19, 2013  May 17, 2013
Printed
Page 167
First bullet

The advice regarding: "...ordering of the unsealed virtual calls must be maintained..." might be clearer with an example or a more detailed explanation.

Note from the Author or Editor:
Yes, I can improve this in the future. What I mean is that if a methods calls virtual method A followed by virtual method B, that, in the future, you should not change the code to call method B first and then Method A as the overridden methods might have taken a dependency on the method invocation order.

Anonymous  Apr 15, 2013 
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 168
the first bullet

"If I really feel that it is important to define a class that others can derive but I do not want to allow specialization, I will simulate creating a closed class by using the above technique of sealing the virtual methods that my class inherits." there is no more "closed" stuff in the edition.

Note from the Author or Editor:
Change the last sentence of the bullet to: “If I really feel that it is important to define a class that others can derive but I do not want to allow specialization, I will override and seal all the virtual methods that my class inherits.”

Zhou Jing  Jan 25, 2013  Mar 08, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 170
3rd paragraph (begins with "Use the new...")

The first sentence of the paragraph, namely: Use the new keyword if hiding was intended." is actually part of the compiler's warning message shown on the previous line. The double-quote after 'intended' is also unnecessary.

Note from the Author or Editor:
The “Use the new keyword if hiding was intended.” Clause should be part of the code in the line above. Then the paragraphs should start with “This warning is …” Also, delete the quote after “intended.”

Sean Hokanson  Jan 30, 2013  Mar 08, 2013
Printed
Page 177
Table 7-1, bottom-right cell, first sentence.

Should "accessed" be 'accesses'?

Anonymous  Mar 19, 2013  May 15, 2013
Printed
Page 205
2nd paragraph (right after bullet list), first sentence

The phrase "... behavior or a type..." should probably be "... behavior of a type...".

Anonymous  Mar 20, 2013  May 15, 2013
Printed
Page 209
First section title

The following section: "Optional and Named Parameters" and the corresponding contents in the book should probably refer to optional and named 'arguments' instead because this adheres to the nomenclature defined in the Visual Studio 2012 Documentation. See: http://msdn.microsoft.com/EN-US/library/vstudio/dd264739%28v=vs.110%29.aspx

Note from the Author or Editor:
Yes, I agree. The section should be titled "Optional and Named Arguments"

Anonymous  Apr 05, 2013  May 15, 2013
Printed
Page 214
Paragraph 3, line 3

The compound word "callsite" is probably meant to be "call site" since the plural form in the same line is written as "call sites".

Anonymous  Mar 20, 2013  May 15, 2013
Printed
Page 253
Code sample

The word "now" in the comment below seems extraneous. "// Copy a reference to the delegate field now into a temporary field for thread safety" Also, describing the temporary as a "field" seems to break the book's convention of calling such entities local variables. Note that these comments also apply to the sample code on p255.

Note from the Author or Editor:
I'd like to change the comment to: "// Copy a reference to the delegate field into a temporary variable now for thread safety" I like using NOW because that is what we get with Volatile.Read.

Anonymous  Mar 21, 2013  May 15, 2013
Printed
Page 261
Code sample

The sample uses the Monitor class without specifying its namespace. Thus, the following line should be added: using System.Threading;

Note from the Author or Editor:
Your are correct. "using System.Threading;" (without quotes) should be added after "using System.Collections.Generic;" at the top of the code.

Anonymous  Apr 16, 2013  May 15, 2013
PDF
Page 262
note

Because System.Windows.EventHandlersStore is not exposed, we cannot use EventHandlersStore at all. (I found this type in PresentationCore using Reflection API, but it is internal class.)

Note from the Author or Editor:
You are correct. The Note should be removed entirely.

YFujiwara  May 05, 2013  May 17, 2013
Printed
Page 280
Line 4

Should the following line include a space between the '>' and "fn2" for better readability (as does line 2)? Func<String, Exception>fn2("") = fn1; // No explicit cast is required here

Note from the Author or Editor:
Yes, a space should be inserted after ">" and before "fn2"

Anonymous  Mar 21, 2013  May 15, 2013
Printed
Page 281
Last paragraph, second sentence

Should the sentence: "A type parameter can be used as a method's parameter, a method's return type, or as a local variable defined inside the method." be written as: "A type parameter can be used as a method parameter's type, a method's return type, or the type of a local variable defined inside the method."

Note from the Author or Editor:
Yes, your proposed structure is better.

Anonymous  Mar 21, 2013  May 15, 2013
Printed
Page 288
Entire section

The section "Secondary Constraints" might be clearer if it explicitly stated that a "type parameter constraint" requires a constrained type to be the equal to, derive from, or inherit the constraining type.

Note from the Author or Editor:
OK, I can add this in the future.

Anonymous  Apr 07, 2013 
Printed
Page 299
First paragraph, first sentence

I think the sentence: "The C# compiler requires that a method that implements an interface be marked as public." should be written as: "The C# compiler requires a method that implements an interface method signature be marked as public."

Note from the Author or Editor:
OK, your sentence structure is better.

Anonymous  Mar 22, 2013  May 15, 2013
Printed
Page 311
Last paragraph, line #3

The phrase "IComparableCompareTo" seems to be missing a separating space: "IComparable CompareTo"

Anonymous  Mar 23, 2013  May 15, 2013
Printed
Page 344
3rd text paragraph (excluding code snippets)

Aidan's 9 now? Here you forgot to update the value from 7 to 9.

Note from the Author or Editor:
Yes, at the very end of the 3rd text paragraph, the "(7)" should be "(9)".

Sven Knödler  May 09, 2013  May 15, 2013
Printed
Page 350
3rd paragraph, "Encodings: Converting Between Characters and Bytes" section

"Likewise, y ou'd use Shift-JIS encoding to read a text file produced on a Japanese Windows 95 system into the CLR." There's a whitespace in the word "y ou'd".

Eugene  May 06, 2013  May 15, 2013
Printed
Page 378
First paragraph

The first sentence says: "For arrays with reference type elements, the CLR allows you to implicitly cast the source array's element type to a target type." However, the second sentence implies, in part, that the existence of an explicit type conversion will facilitate such an implicit cast? The material that follows also includes examples of explicit casts. Thus, was the phrase "... to implicitly cast ..." intended to be "... to cast ..."?

Note from the Author or Editor:
Yes, the word "implicitly" should be removed from the first sentence.

Anonymous  Mar 25, 2013  May 15, 2013
Printed
Page 378
Entire section

Because Array.Copy() is discussed so extensively, in this section, it might be helpful to mention that it performs shallow copies here as well rather than waiting until page 382.

Note from the Author or Editor:
I'll consider this change for a future edition.

Anonymous  Mar 25, 2013 
Printed
Page 398
Table 17-1

The first two columns seem to be missing a row separator between their first and second proper items (which the third column isn't missing).

Anonymous  Mar 25, 2013  May 17, 2013
Printed
Page 409
Syntactical Shortcut #1

This was somewhat difficult to follow because it never generalized the example. The general case seems to be that a delegate object will be created for a method name argument that's passed to a delegate type parameter. The following language was also confusing: "Here, the ThreadPool class's static QueueUserWorkItem method expects a reference to a WaitCallback delegate object that contains a reference to the SomeAsyncTask method." Literally however, QueueUserWorkItem only expects a reference to a WaitCallback delegate object. It has no expectation as to which particular method that delegate object references.

Note from the Author or Editor:
I can improve this in a future edition.

Anonymous  Mar 25, 2013 
Printed
Page 421
Introduction to the Chapter 18, 5th sentence

"As you use the various .NET Framework technologies (Windows Forms, WPF,WCF, , and so on)..." A whitespace is missing between "WPF" and "WCF" acronyms and after that there's a redundant comma.

Eugene  May 06, 2013  May 15, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 443
Footer

Odd pages' footer for pages 443-447 has "nullable" spelled as "nullabe", missing the L.

Eric Lawrence  Feb 18, 2013  Mar 08, 2013
Printed
Page 444
Truth table for '&' and '|'

The format of this table is confusing. I didn't immediately realize it was a standard truth table for two reasons: • The upper-left cell holding a description of the table's operations uses unorthodox notation: "(Operand1 &#8594; Operand2&#8595; )". I still don't understand what it means. • The leftmost column cells aren't shaded -and- the format of their entries doesn't match that of the corresponding row headers.

Note from the Author or Editor:
I can improve the table in a future edition.

Anonymous  Mar 26, 2013 
Printed
Page 497
Third paragraph, second line

The phrase: "...don't call any virtual methods..." should probably read: "...doesn't call any virtual methods..."

Anonymous  Mar 26, 2013  May 15, 2013
Printed
Page 506
Paragraph 6, line 1

I think the phrase: "As region fills..." should probably be: "As the region fills..."

Anonymous  Mar 26, 2013  May 15, 2013
Printed
Page 515
Line 1

The phrase: "...because the last collection." should probably be: "...since the last collection." Also, on the same line, the phrase: "...that have had fields change need..." should probably be: "...that have had fields changed need..."

Anonymous  Mar 26, 2013  May 15, 2013
Printed
Page 518
Paragraph 2, line 3

The phrase: "... or you calculate ..." should probably be: "... or you could calculate ..."

Anonymous  Mar 26, 2013  May 15, 2013
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 549
1st line

"...is more efficient that..." should be "...is more efficient than..."

James Wiseman  Jan 02, 2013  Mar 08, 2013
Printed
Page 557
Third to last paragraph, line 4

The phrase: "... because the AppDomain has been created." should probably be: "... since the AppDomain has been created." Note that a similar phrase appears on p515 line1 which may suggest the propagation of a spurious find and replace.

Anonymous  Mar 27, 2013  May 15, 2013
Printed
Page 563
Paragraph 2, line 3

The type name "MarshalByValueType" is divided by one or more blank spaces: "MarshalBy ValueType".

Note from the Author or Editor:
Correct, the space should be removed between "MarshalBy" and "ValType"

Anonymous  Mar 27, 2013  May 15, 2013
Printed
Page 571
Note, line 5

Should the phrase: "... the new thread will process a CannotUnloadAppDomainException ..." be written as: "... the new thread will throw a CannotUnloadAppDomainException ..."?

Note from the Author or Editor:
Yes, you are correct.

Anonymous  Mar 27, 2013  May 15, 2013
Printed
Page 573
Last paragraph, first sentence

The phrase: "... that are throwing the exception." seems incorrect.

Note from the Author or Editor:
It should say "that IS throwing the exception"

Anonymous  Mar 27, 2013  May 15, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 644
2nd paragraph, end of second sentence

The end of the sentence reads "...because its inception." It should read "...since its inception."

Sean Hokanson  Jan 30, 2013  Mar 08, 2013
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 687
bottom of page

last sentence reads "...the five highlighted relative thread priorities listed in Table 26-1" But the table has no highlights in printed version. (Not too much of a problem since the text makes it clear which of these priorities should be highlighted.)

Note from the Author or Editor:
In table 26-1, in the Normal column, the squares with 6, 7, 8, 9, & 10 should be highlighted in some way (like s shaded background). Also, it was intent that the number be centered horizontally & vertically in the squares. Also, Idle, Below Normal, Normal, Above Normal, High, and Realtime should be centered horizontally in their squares too.

Peter Partch  Dec 29, 2012  Mar 08, 2013
Printed
Page 700
Paragraph starting "It is often valuable..."

The phrase "self-cancel itself" is redundant. The phrase should be changed to either "self-cancel" or "cancel itself."

Anonymous  May 01, 2013  May 15, 2013
Printed
Page 701, 706
Comment above PreferFairness enum element

The phrase "sooner than later" should be changed to "sooner rather than later."

Anonymous  May 02, 2013  May 15, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 719
4th paragraph

"WIthDegreeOfParallelism" has to be changed with "WithDegreeOfParallelism", WIth -> With

Myung Shin Kim  Jan 02, 2013  Mar 08, 2013
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 719
4 functions signature

a white space is needed in second parameter

Note from the Author or Editor:
At the code at the top, there should be: a space between “CancellationToken” and “cancellationToken”. A space between “Int32” & “ degreeOfParallelism”. A space between “ParallelExecutionMode” & “executionMode”. A space between “ParallelMergeOptions” & “mergeOptions”.

Myung Shin Kim  Jan 02, 2013  Mar 08, 2013
ePub, Mobi
Page 730
Figure 28-2

Figure 28-2 in the ePub and Mobi e-books are outdated and different from the PDF version (and presumably also the printed book). The associated text and PDF figure refer to ReadAsync, but the outdated figures refer to BeginRead and a CallbackMethod.

Note from the Author or Editor:
It appears that the final figures did not make it into the epub and mobi in all cases. We are looking into this now and will release updated files ASAP. Apologies for the inconvenience!

Tiaan Geldenhuys  Feb 09, 2013  Feb 20, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 743
last paragraph, and footnote

The class which defines 'FromAsync' should be 'TaskFactory' instead of 'TaskSchedular'.

Yusuke Fujiwara  Jan 13, 2013  Mar 08, 2013
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 830
five index entries up from the bottom of the left column

The index entry states "Component Object Model (COM). See COM objects". However, no "COM objects" index entry exists.

Sean Hokanson  Jan 30, 2013  Mar 08, 2013