Errata
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 |
---|---|---|---|---|---|
Printed | Page CD-ROM |
Updated code samples for Refactoring Walkthrough in chapter 4 available for download |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 15 |
Error should be Pragma |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 24 |
Error in Conditional Operator example |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 37 |
Variable name error in code sample |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 40 |
Error in switch statement explanation |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 54 |
Reference to Chapter 9 is incorrect |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 58 |
"Chapter 6" should be "Chapter 5" |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 68 |
Destructor description missing the word "name" |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 70 |
Comment contains incorrect method |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 80 |
Technical error in comparison of locala and localb variables |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 150 |
Derived class referenced in place of base class |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 187 |
Term "multirectangle" used in place of "multidimensional" |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 206 |
IComparer should be IComparable |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 281 |
The term "an enumerator" is used in place of "enumerated" |
Microsoft Press | Jul 13, 2010 | |
Printed | Page 386-387 |
Incorrect code sample included |
Microsoft Press | Jul 13, 2010 | |
Other Digital Version | CD-ROM |
Incorrect variable name used in Chapter 2prop_errorperson1.cs and Chapter 2prop_errorperson2.cs sample files The ninth line of both the Chapter 2prop_errorperson1.cs and Chapter 2prop_errorperson2.cs sample files reads: if(age120) {It should read: if(value120) { |
Microsoft Press | May 06, 2010 | |
Printed | Page 11 |
Missing ")" and ";" in code sample On Page 11, the 12th line of the first code sample reads: Console.WriteLine(objGreeting.FrenchIt should read: Console.WriteLine(objGreeting.French); |
Microsoft Press | May 06, 2010 | |
Printed | Page 21 |
Incorrect Sample code for Postfix Increment and Postfix Decrement in Table 1-4 On page 21, the Postfix Increment and Postfix Decrement rows of Table 1-4 read: Postfix Increment ++ variable --; 10; 10 Postfix Decrement -- variable ++; 11They should read: Postfix Increment ++ variable ++; 11 Postfix Decrement -- variable --; 10 |
Microsoft Press | May 06, 2010 | |
Printed | Page 33 |
Multiple errors in Figure 1-3 On page 33, Figure 1-3 contains mlutiple errors in both columns. Under file1.cs change: "NamespaceA" To: "NamespaceZ" Also under file1.cs completely remove the reference to "namespace NamespaceB". Under file2.cs change: "namespace NamespaceA namespace Namespace C" To: "namespace NamespaceZ namespace NamespaceY" |
Microsoft Press | May 06, 2010 | |
Printed | Page 37 |
variablea referenced in place of variable2 On page 37, the second to last sentence of the final paragraph reads: "This code sets the default value for variablea to zero." It should read: "This code sets the default value for variable2 to zero." |
Microsoft Press | May 06, 2010 | |
Printed | Page 48 |
Incorrect variable name used in code sample On page 48, the ninth and tenth lines of the code sample read: Employee Jim=new Employee(); Fred.name="Wilson, Jim";They should read: Employee Fred=new Employee(); Fred.name="Wilson, Fred"; |
Microsoft Press | May 06, 2010 | |
Printed | Page 54 |
Incorrect reference to Chapter 6 On page 54, the last sentence under the Member Functions paragraph contains an incorrect reference to Chapter 6. Change: "The discussion of indexers is deferred to Chapter 6, “Arrays and Collections.”" To: "The discussion of indexers is deferred to Chapter 5, “Arrays and Collections.”" |
Microsoft Press | May 06, 2010 | |
Printed | Page 66 |
Error in description of constructor output On page 66, the fourth sentence of the paragraph immediately following the bulletted list reads: "The static constructor is stubbed to output a method." It should read: "The static constructor is stubbed to output a message." |
Microsoft Press | May 06, 2010 | |
Printed | Page 68 |
"Chapter 16" should be "Chapter 14" On page 68, the last sentnce of the "Destructors" paragraph and the 3rd sentence under the "Destructor syntax" contain an incorrect reference to Chapter 16. Change: "Implementing a disposable pattern is one of the topics found in Chapter 16." To: "Implementing a disposable pattern is one of the topics found in Chapter 14." Change: "These topics are also covered in Chapter 16." To: "These topics are also covered in Chapter 14." |
Microsoft Press | May 06, 2010 | |
Printed | Page 71 |
Term "backing" used in place of the term "data" On page 71, the first line currently reads: "public, whereas the backing store is private." This should read: "public, whereas the data store is private. " |
Microsoft Press | May 06, 2010 | |
Printed | Page 80 |
Example variable has the wrong type On page 80, the third line of the first code sample in the "Identity versus Equivalence" section reads: double localc=5;It should read: int localc=5; |
Microsoft Press | May 06, 2010 | |
Printed | Page 150 |
Incorrect instruction for creating a derived class relationship On page 150, the third sentence on the page reads: "Drag the inheritance line from the base class to the derived class." It should read: "Drag the inheritance line from the derived class to the base class." |
Microsoft Press | May 06, 2010 | |
Printed | Page 201 |
Array.CreateInstance Method code example is partially incorrect On page 201, the code example contains incorrect array offsets. The correction starts on line 7. Change: Assembly executing=Assembly.GetExecutingAssembly(); Type t=executing.GetType(argv[0]); Array zArray=Array.CreateInstance( t, argv.Length-2); for(int count=2;count<argv.Length;++count) { System.Object obj=Activator.CreateInstance(t, new object[] { argv[count]}); zArray.SetValue(obj, count-2); } foreach(object item in zArray) { MethodInfo m=t.GetMethod(argv[1]); m.Invoke(item, null); }To: Assembly executing = Assembly.GetExecutingAssembly(); Type t = executing.GetType(argv[1]); Array zArray = Array.CreateInstance( t, argv.Length - 3); for (int count = 3; count < argv.Length; ++count) { System.Object obj = Activator.CreateInstance(t, new object[] { argv[count]}); zArray.SetValue(obj, count - 3); } foreach (object item in zArray) { MethodInfo m = t.GetMethod(argv[2]); m.Invoke(item, null); } |
Microsoft Press | May 06, 2010 | |
Printed | Page 235-236 |
Technical errors in code sample On pages 235-236, the code sample reads: using System; namespace Donis.CSharpBook{ public class Starter{ public static void Main(){ StackInt stack=new StackInt(5); stack.Push(10); stack.Push(15); Console.WriteLine("Pushed 3 values"); stack.ListItems(); stack.Pop(); Console.WriteLine("Popped 1 value"); stack.ListItems(); } } public class StackInt { public StackInt(int firstItem) { list=new int[1] {firstItem}; } public int Pop() { if(top!=0) { return list[--top]; } throw new Exception("Stack empty"); } public void Push(int topitem) { ++top; if(top==list.Length) { int [] temp=new int[top+1]; Array.Copy(list, temp, top); list=temp ; } list[top]=topitem; } public void ListItems () { for(int item=0;item<=top;++item) { Console.WriteLine(list[item]); } } private int [] list; private int top=0; } }It should read: using System; namespace Donis.CSharpBook{ public class Starter{ public static void Main(){ StackInt stack=new StackInt(5); stack.Push(10); stack.Push(15); Console.WriteLine("Pushed 3 values"); stack.ListItems(); stack.Pop(); Console.WriteLine("Popped 1 value"); stack.ListItems(); } } public class StackInt { public StackInt(int firstItem) { list=new int[1] {firstItem}; top++; } public int Pop() { if(top!=(-1)) { return list[top--]; //was list[--top] } throw new Exception("Stack empty"); } public void Push(int topitem) { ++top; if(top==list.Length) { int [] temp=new int[top+1]; Array.Copy(list, temp, top); list=temp ; } list[top]=topitem; } public void ListItems () { for(int item=0;item<=top;++item) { Console.WriteLine(list[item]); } } private int [] list; private int top=(-1); } } |
Microsoft Press | May 06, 2010 | |
Printed | Page 281 |
Incorrect variable name used in the code sample On page 281, the 14th line of the code sample reads: foreach(int number in generic) {It should read: foreach(int number in simple) { |
Microsoft Press | May 06, 2010 |