Errata
The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted by | Date submitted |
---|---|---|---|---|
Printed | Page 4 Figure 1.1 |
"macorlib.dll" should be "mscorlib.dll" |
Anonymous | Sep 09, 2010 |
Printed | Page 4 Figure 1-1 |
The heading of the dotted line circle reads macorlib.dll. |
Morten Thomas | Apr 26, 2011 |
Printed | Page 10 in the Tip |
Change "We explain assemblies in detail in Chapter 16." to "We explain assemblies in detail in Chapter 17." |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 12 middle of page |
Change ?The semicolon is used to terminate a statement. ... The Braces are used to group multiple statements ... The period denotes ... The parentheses are used ... (the equal sign ... ? to ?A semicolon is used to terminate a statement. ... Braces are used to group multiple statements ... A period denotes ... Parentheses are used ... (an equal sign ...? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 15 "Instance and static members" section |
Although this is very early in the book and in the development of C# 4.0 concepts, perhaps a footnote should be added that refers to pg. 947, first paragraph, 2nd and 3rd sentences, which say about multiple application domains : |
JimboT | Feb 24, 2011 |
Printed | Page 19 Denmark |
In figure 2-4 the value of Y is shown to be 7 in the object pointed to by p1 and p2. This appears to be wrong, since Y has not changed since being initialized to 0. |
Jacob Berlin Rasmussen | Sep 18, 2012 |
Page 25 3rd line of code after first paragraph |
In the comment, is says DivisionByZeroException. It should be DivideByZeroException. |
johnsterling | Jun 10, 2011 | |
Page 32 String concatenation |
The text implies that conversion to string will only be done for the righthand operand for the + operator. However, according to MSDN's C# reference: |
johnsterling | Jun 07, 2011 | |
Printed | Page 56 First sentence in the section on Miscellaneous Statements |
The text refers the reader to Chapter 19 for a discussion of the lock statement and the Monitor class but that discussion is in Chapter 21. |
Hanna Ruotsalainen | Nov 02, 2010 |
Printed | Page 57 using Directive section |
There should be something in this section about what the compiler does if you have multiple using statements referencing different namespaces that just happen to have an identically named type that you want to use without any qualification. In this case the compiler issues an error indicating that the use of the type name is ambiguous. This is an important safety factor which your readers should be aware of. Maybe an example would help: |
John Pinto | Sep 02, 2010 |
Printed | Page 57 Namespaces section |
In your examples of nested namespaces, while technically correct, they seem to give the impression that namespaces such as, e.g., System.Collections and System.Collections.Generic are programmatically related, when they are not. The paw print note on p. 59 hints at this but isn't explicit as it should be. For example, this of course is not valid C# code: |
Anonymous | Jun 21, 2011 |
Printed | Page 60 First example in "Alias Types and Namespaces" |
The example code demonstrates aliasing a namespace, but the expression references a class, not a namespace and will not compile. |
Stan Morris | Mar 20, 2010 |
Printed | Page 71 middle of page |
Replace ?The syntax for using indexers is like that for using arrays when the index is an integer type.? with ?The syntax for using indexers is like that for using arrays except that the index parameter(s) can be any type(s).? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 78 last paragraph in Upcasting section |
"To get to its SharedOwned field [...]" should be replaced with: "To get to its SharesOwned field [...]" |
Piotr K. | Feb 15, 2011 |
Printed | Page 88 listing |
Replace ?Public extern Type GetType()? with ?Public Type GetType()? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 88 2nd caption |
Under caption "Object Member Listing" class Object's member GetType() is listed with the extern modifier, which is different from the MSDN documentation: http://msdn.microsoft.com/en-us/library/system.object.gettype.aspx |
Anonymous | Sep 04, 2011 |
Printed | Page 90 1/3 of the way down |
Replace ?? the default accessibility members of a class or struct? with ?? the default accessibility of members of a class or struct? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 93 subsection ?Explicit Interface Implementation? |
Add a reference to this subsection to the index. |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 103 first hyphenated line |
"nee- / ded" to "need- / ed" |
Anonymous | Jan 11, 2011 |
Printed | Page 107 3rd paragraph |
Text says "where the type parameter T is of the type parameter U:" |
Tod Gentille | Aug 05, 2011 |
Printed | Page 120 Section "The Func and Action Delegates" |
Both Func<> and Action<> accept only up to T4, not up to T16. |
Gorpik | Mar 11, 2010 |
Printed | Page 123 Last sentence of "Return type compatibility" section |
This sentence should say : |
JimboT | Feb 20, 2011 |
Printed | Page 123 First sentance |
"...,you may get back a type that is more specific..." should be "LESS specific". Similar to other unconfirmed error on same page. |
Richard Fayko | Nov 14, 2011 |
Printed | Page 137 First sentence of the tip before "The finally Block" |
This sentence says : |
JimboT | Feb 20, 2011 |
Printed | Page 138 Omission from "The using statement" |
Why is there no mention of the possibility (described in section 8.13 of the C# Language Specification, Version 4.0) of declaring several objects with a single declaration? E.g.: |
Anonymous | Feb 10, 2011 |
Printed | Page 142 Accumulator class |
The presented Accumulator pattern is much too complicated. It has two disadvantages: |
Andres Rohr | Apr 23, 2011 |
Printed | Page 144 Last sentence before the tip |
This sentence states : |
JimboT | Feb 20, 2011 |
Printed | Page 153 Second sentence of second bullet item |
This sentence says : |
JimboT | Feb 20, 2011 |
Printed | Page 156 2nd paragraph in "Miscellaneous Statements" |
Should be: |
Anonymous | Jan 11, 2011 |
Printed | Page 162 in Tip |
Change "third" to "fourth". 1) Static, 2) Dynamic, 3) Custom, 4) Language, 5!) Interop. Wait change it to "fifth" or "another"! |
Anonymous | Jan 11, 2011 |
Printed | Page 164 Runtime Representation of Dynamic - example following 1st paragraph |
typeof(dynamic) gives the compiler error: The typeof operator cannot be used on the dynamic type. |
Alan Fox | Jun 28, 2010 |
Printed | Page 169 near the bottom |
Replace ?We describe how to write your own attributes in Chapter 17.? With ?We describe how to write your own attributes in Chapter 18.? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 191 last paragraph |
Replace ?The types for communicating with WCF are in, and are below, the System.ServiceModel namespace.? with ?The types for communicating with WCF are in, and below, the System.ServiceModel namespace.? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 192 5th hyphenated line |
Change "intero- / perbility" to "inter- / operability" |
Anonymous | Jan 11, 2011 |
Page 200 near top |
because the following returns 1 |
iman abidi | Jul 13, 2012 | |
Printed | Page 201 near the top of page |
Replace ?The result of the final comparison ?? with ?The result of the third example ?? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 212 first block of code |
To get a result that will be correct for all readers, change the code |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 238 6th paragraph in section "BigInteger" |
"You can implicitly cast a BigInteger to a standard numeric type and explicitly cast in the other direction." This sentence is only valid for floating-point standard numeric types. Cast from integral types are already covered at the beginning of the section. |
Gorpik | Mar 17, 2010 |
Printed | Page 238 8th paragraph in section "BigInteger" |
"BigInteger overloads all the arithmetic operators, as well as [...] modulus(%) [...]". In fact, modulus is an arithmetic operator. |
Gorpik | Mar 17, 2010 |
Printed | Page 250 class Test<T> |
The line |
Andres Rohr | Jul 03, 2011 |
Page 263 Top of the page, just before the heading "Enumerating Enum Values" |
According to the documentation of Enum.Parse, it throws an "ArgumentException", not a "FormatException", if the member is not found. |
Voltage Spike | Feb 22, 2012 | |
Printed | Page 269 First code example |
Brittle code: a client application will crash if it calls MoveNext() one time after reaching the end of the collection, and then proceeds to get the Current property. |
AlvinMinring | Apr 05, 2011 |
Page 275 |
object[] a1 = { "string", 123, true }; |
Terje Solem | Mar 01, 2012 | |
Printed | Page 277 2nd paragraph after code sample and hint |
Array.CreateInstance appears as two separate words (Array.CreateIn stance) |
Gorpik | Mar 23, 2010 |
Printed | Page 284 code sample at the top |
Close up the white space between ?}? and ?Public delegate TOutput Converter ? .? |
Howard Weisberg | Dec 19, 2010 |
Printed | Page 293 3rd paragraph |
TryGetValue appears as two different words (TryGet Value). |
Gorpik | Mar 26, 2010 |
Printed | Page 304 paragraph before title : Iequality and.... |
"which allows the option of structural comparisons on Tuples and arrays (and not classes) |
Royi Namir | Mar 17, 2012 |
Printed | Page 309 Last code listing |
This example should be case-insensitive in order to work like the SurnameComparer in the previous section. Besides, as it is, it gives awkward results with names starting in Mc. |
Gorpik | Mar 29, 2010 |
Printed | Page 333 diagram at top, Figure 8-8 |
Diagram is for the following statement |
James Schumacher | Jul 11, 2012 |
Printed | Page 344 2nd code listing and text afterwards |
In the code example and its SQL equivalent, Pair() is called after OrderBy(); but the explanation after the code and the diagram in figure 8-10 call Pair() before OrderBy(). |
Gorpik | Apr 05, 2010 |
Printed | Page 344 Code and result display before 3rd paragraph |
Two problems: |
Steven Rogers | Jun 29, 2010 |
Page 361 IEnumerable query / 5th paragraph |
.OrderBy (n => n) should be after .Pair(), not before, |
Bobby | Aug 03, 2010 | |
Printed | Page 377 Code example in section "Select subqueries and object hierarchies" |
In the last line of the code example, better use " - Len: " instead of just "Len: " to avoid messing the file names. |
Gorpik | Apr 05, 2010 |
Printed | Page 386 Code listings |
The C# class Purchase has a field called Date, but this does not appear in the SQL table definition below. |
Gorpik | Apr 05, 2010 |
Printed | Page 478 table |
Page incorrectly discribes the actions of StreamReader/ |
Anonymous | Oct 02, 2012 |
Printed | Page 479 478 (Opt-in disposal), 479 |
Page 478, code listing in "Opt-in Disposal": |
kchow8 | Jul 21, 2011 |
Printed | Page 490 Last sentence of tip |
This sentence states : |
JimboT | Feb 20, 2011 |
Printed | Page 490 Second clause of last full sentence on page |
This sentence says : |
JimboT | Feb 20, 2011 |
Printed | Page 503 Method 'ShowMessage' |
The body should read |
Andres Rohr | Jul 24, 2011 |
Printed | Page 514 Throughout "Preconditions and Overridden Methods" |
Everywhere I see "overridden" on this page, and on page 516 in "Postconditions and Overridden Methods", it seems wrong. I believe "overriding" is correct. |
Anonymous | Jan 11, 2011 |
Printed | Page 524 "Debugger Integration" section |
DbgCLR(.exe) has not been included in the .NET Framework SDKs since v3.5. The last SDK it was included in was v2.0's SDK. Mdbg is a managed debugger included in the .NET 4.0 Framework SDK, but it is a command-line app, not a GUI app. Google the term "DbgCLR" to learn more. Also see this post : |
JimboT | Feb 15, 2011 |
Printed | Page 524 "Debugger Integration" section |
Regarding the absence of the free GUI debugger DbgCLR(.exe) in SDKs past v2.0, pages found in Google about DbgCLR suggest downloading the free Visual Studio Express to get a CLR debugger with a GUI interface. Of course, the Express edition is not stripped down to just the debugger. Also, the lifetime of the Express edition is limited. |
JimboT | Mar 10, 2011 |
Printed | Page 524 "Debugger Integration" section |
The Visual Studio 2010 Integrated Shell (but not the Isolated Shell) also appears to contain the Visual Studio debugger. This could be a useful alternative to downloading the (temporary) instance of Visual Studio Express. The description of it says : |
JimboT | Oct 14, 2011 |
Printed | Page 584 WebClient section |
Should a footnote be added, warning not to confuse the WebClient class in System.Net namespace with the WebClient class in Silverlight's subset of the .NET Framework? |
JimboT | Feb 24, 2011 |
Printed | Page 585 First sentence of Note |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 597 in the function Listen() |
|
Frank J. Reashore | Oct 28, 2010 |
Printed | Page 614 middle of page |
"At a minimum: * Add the [DataContract] attribute to each type. |
Nathan Finstein | May 31, 2012 |
Printed | Page 681 2nd Paragraph , Line 1 |
A missing 'a' in assembly |
Chris Henderson | May 30, 2012 |
Printed | Page 741 First and last sentences of 3rd paragraph up from bottom |
Single dispatch is explained in the preceeding paragraphs. The last sentence of the 3rd paragraph from the bottom states : |
JimboT | Feb 21, 2011 |
Printed | Page 754 Second and third sentences of first paragraph that follows the two-paragraph tip at the top |
These sentences state : |
JimboT | Feb 21, 2011 |
Printed | Page 761 Third sentence of paragraph after GetTVRoomKey method |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 761 Sixth sentence of paragraph after GetTVRoomKey method |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 762 First sentence of paragraph before second set of bullet points in the middle of the page |
This sentence states : |
JimboT | Feb 21, 2011 |
Printed | Page 763 Tip about methods that are considered dangerous, but are not actually dangerous |
A list of ALL such methods that cannot be abused, and which can be marked with [SecuritySafeCritical] would be useful. Would MSDN have any such list? A URL would be just as helpful. |
JimboT | Mar 01, 2011 |
Printed | Page 767 First sentence of second paragraph up from bottom |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 768 First sentence of second bullet points in the set of bullet points at the top |
This sentence states : |
JimboT | Feb 21, 2011 |
Printed | Page 768 First sentence of first bullet point |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 768 First sentence of second bullet point |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 768 Third sentence up from the bottom |
This sentence states : |
JimboT | Feb 24, 2011 |
Printed | Page 769 "Sandboxing Another Assembly" section |
On page 954, in the second sentence of the paragraph after the tip, this section is referenced. It might be helpful to add a footnote on pg. 769 that references the "Isolating Types and Assemblies" section on pg. 954. |
JimboT | Feb 24, 2011 |
Printed | Page 770 First sentence of tip at the top |
The first sentence states : |
JimboT | Feb 22, 2011 |
Printed | Page 801 Second sentence of tip at the bottom |
The second sentence starts with : |
JimboT | Feb 22, 2011 |
Printed | Page 820 Static methods section |
The heading "Static methods" should be "Static members". |
JimboT | Feb 22, 2011 |
Printed | Page 820 Last sentence of 2nd paragraph of Static methods (mmebers) section |
This sentence starts off with : |
JimboT | Feb 22, 2011 |
Printed | Page 821 First sentence of tip at the top |
This sentence states : |
JimboT | Feb 22, 2011 |
Printed | Page 824 lock (_locker ProgressStatus) status = _status; |
There is a syntax error on this line. lock (_locker ProgressStatus) isn't even valid syntax. Furthermore, the _locker variable doesn't exist in this context. Finally, within the lock statement, you are assigning a reference to a reference type, which does not require locking. I am under the impression that the type ProgressStatus (from the same page) was meant to be a struct, such that assignment would perform an implicit copy. |
Travis Parks | Oct 16, 2010 |
Printed | Page 824 last code segment |
for this code segment, I am reading: |
Steve D'Sa | Nov 01, 2011 |
Printed | Page 831 Third sentence of first full paragraph on page |
The third sentence states : Note from the Author or Editor: |
JimboT | Feb 22, 2011 |
Printed | Page 834 Figure 21-2 |
In the upper line for the Main thread, after the 1000 millisecond sleep completes, the Set method of "wh" is called. Is this an intentional abbrieviation of the member "_waitHandle" in the code on pg. 833, or is it a typo? Note from the Author or Editor: |
JimboT | Feb 22, 2011 |
Printed | Page 840 Second sentence of tip at the top |
The second sentence states : |
JimboT | Feb 22, 2011 |
Printed | Page 852 Last bullet point in the "BackgroundWorker" section |
This bullet point states : |
JimboT | Feb 22, 2011 |
Printed | Page 862 1st code listing on double-checking locking |
Printed, pg 862 on double-checked locking code listing: |
kchow8 | Jul 28, 2011 |
Printed | Page 870 First bullet point |
This bullet point states : |
JimboT | Feb 22, 2011 |
Printed | Page 872 First sentence of first paragraph |
This sentene has the same mistake as on pg. 871. The first sentence states : |
JimboT | Feb 22, 2011 |
Printed | Page 888 Second set of bullet points, first bullet item |
This bullet point states : |
JimboT | Feb 22, 2011 |
Printed | Page 892 Section titled "Parallel.Invoke" |
To be explicit, an aside or footnote should be added saying that Parallel.Invoke should not be confused with P/Invoke (interop). |
JimboT | Feb 27, 2011 |
Printed | Page 919 3rd line of code in method EnqueueTask |
"tcs" (an instance of TaskCompletionSource) is in bold type on the first and 3rd lines. Therefore, shouldn't it also be in bold on the second line, where it is an argument to the constructor of WorkItem? |
JimboT | Feb 22, 2011 |
Printed | Page 933 First sentence after code |
The first sentence states : |
JimboT | Feb 22, 2011 |
Printed | Page 954 12th line |
the signature seemingly should be that of CreateInstanceAndUnwrap, instead of CreateInstanceFromandUnwrap |
Ting Xing | Jun 13, 2011 |
Printed | Page 957 First sentence of second paragraph, after section title "Calling into Native DLLs" |
Add a footnote somewhere warning not to confuse P/Invoke (interop) with Parallel.Invoke. |
JimboT | Mar 01, 2011 |
Printed | Page 958 2nd paragraph |
All UnmanagedType members are listed at the end of this chapter |
Vincent Croquette | Mar 09, 2011 |
Printed | Page 998 Between [AllowPartiallyTrustedCallers] and anchors index entries |
Should there be an entry in the index for "ambient property" on pg. 152? This introduces the concept of WPF's property inheritance. |
JimboT | Feb 22, 2011 |
Printed | Page 999 Basic Multiclingual Plane |
This should be "Basic Multilingual Plane". |
JimboT | Feb 22, 2011 |
Printed | Page 1002 omission |
It might be helpful to include the term "constructor initializer" in the index even though it is never used in the text near where the concept is introduced. |
Anonymous | Jan 11, 2011 |
Printed | Page 1002 Between ContainsKey method and contextual keywords |
Should there be an entry in the index for "ContextBoundObject" on pg. 818? |
JimboT | Feb 22, 2011 |
Printed | Page 1004 Index, 1st column, 60% down. |
"lambda" typo (as "lambca") |
arodriguez | Jun 13, 2011 |
Printed | Page 1007 extern modifier |
"Extern" is also discussed on pg. 766 |
JimboT | Feb 22, 2011 |
Printed | Page 1008 Between function members and functional purity |
Should there be an entry in the index for "functional construction" on pg. 418? |
JimboT | Feb 23, 2011 |
Printed | Page 1008 functional purity |
Add pages 420 and 510 as an index entry. Of course, the purity discussed on pg. 510 is not about PLINQ. |
JimboT | Feb 23, 2011 |
Printed | Page 1009 Between IComparer interface and identifiers |
Should there be an entry for "IComponent, Visual Studio component tray" on pages 852 and 870? |
JimboT | Feb 23, 2011 |
Printed | Page 1009 immutable objects |
Immutable objects are also referred to on pg. 253. |
JimboT | Feb 23, 2011 |
Printed | Page 1009 New entry for IComponent, between IComparer interface and identifiers |
Add a reference to pg. 585 for IComponent in the index. |
JimboT | Feb 24, 2011 |
Printed | Page 1016 properties |
(Ambient) properties are also discussed on pg. 152. |
JimboT | Feb 23, 2011 |
Printed | Page 1018 column 2, very bottom |
Under index entry for "signaling", the 2nd sub-entry says : |
JimboT | Dec 01, 2010 |
Printed | Page 1023 2nd column, index entry for "WPF" |
The index entry for "WPF" lists only pg. 188. However, the book also briefly mentions WPF on pages 492, 493, 822, 840, and 851, from what I've seen so far. |
JimboT | Dec 01, 2010 |
Printed | Page 1023 Windows Forms |
Windows Forms are also referred to on pages 493, 666, 670, 756, 791, 799, 814, 851-852, 840, 869-872, and 909. |
JimboT | Feb 23, 2011 |
Printed | Page 1023 WPF |
WPF/Windows Presentation Foundation is also referred to on pages 183, 234, 665-666, 670, 668, 756-757, 791, 799, 814, 852, 869-872, and 909. |
JimboT | Feb 23, 2011 |