Errata

Programming C#

Errata for Programming C#

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.

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 43
Example 3-10. Using goto

There is an indentation error in this example. The return statement in the lines

if (i < 10)
goto repeat; // the dastardly deed
return 0;

should not be on the same level as the 'if' since this statement is always executed.
So the correct indentation would be:

if (i < 10)
goto repeat; // the dastardly deed
return 0;

Anonymous   
Printed Page 64
2nd paragraph in 'Defining Classes'

2nd sentence of paragraph '...your classes will use the keyword publicError! Bookmark
not defined. as an access modifier'

Anonymous   
Printed Page 106
5th chapter

In the Button class, the top and left variables are used in the overriden DrawWindow
method, but are never registered in a local variable.
Then, there is an error at compile time.

Anonymous   
Printed Page 269
bottom of page

In the example on delegates, this code snippet is given:

return (String.Compare(s1.name, s2.name) < 0 ?
comparison.theFirstComesFirst :
comparison.theSecondComesFirst);

I believe it should include the function definition:

public Comparison WhichStedentIsFirst(Student s1, Student s2) {
return (String.Compare(s1.name, s2.name) < 0 ?
comparison.theFirstComesFirst :
comparison.theSecondComesFirst);
}

Anonymous   
Printed Page 269,270
Bottom of 269 and top of 270

On the 2nd paragraph and the tip on page 270, the book talks about the
WhichStudentComesFirst method. However, up to this point, there has not been
anything on the method except for the body of the method that is assumed to be a part
of that method on the bottom of page 269. Looking at Ex 12-1 will show that the code
on the bottom of page 269 is certainly the body of the method WhichStudentComesFirst.
To eliminate confusion, the code listing including the method name should be put on
the bottom of page 269. Besides, just looking at the code on page 269, what does s1
and s2 refer to? Again, it's the need to eliminate confusion and be clear.

Anonymous   
Printed Page 336
last paragraph

In the Delete button click event, the Status label's text is set to:
"Deleting " + txtTargetDir.Text + "\" + file.Name + "..."
But the file's are not being deleted from the target directory.

Anonymous   
Printed Page 366
First Paragraph

Line Reads:
The DataSet has a collection of tables; you care only about the first one because
you've retrieved only a single record:

It should read:
The DataSet has a collection of tables; you care only about the first one because
you've retrieved only a single table:

In the example, we have selected only a single table into the DataSet not a single
record.

Anonymous   
Printed Page 370,373,377,381,392
Code Listing

In the Dispose method (on pages 370, 373, 377, 381, and 392), the comparison between
components and null are
...
if (components == null)
...

It should be
...
if (components != null)
...

Anonymous   
Printed Page 422
5th paragraph

The default name that Visual Studio provides is WebService1
should be:
The default name that Visual Studio provides is Service1

Anonymous   
Printed Page 485
Last paragraph

The file Calc.cs
should be:
myCalc.cs

Anonymous   
Printed Page 486
Section of makefile that adds the calc.dll module

Calc.cs
should be:
myCalc.cs

Anonymous   
Printed Page 502
First paragraph

The BugFixAttribute constructor takes three parameters: bugID, programmer and date.
But the text only identifies programmer and date as the positional arameters.
Shouldn't bugID also be identified as such?

Anonymous   
Printed Page 596
6th line up from the bottom of the page

SIZE_BUFF is used here but in the code listing on page 594 SizeBuff is used instead.

Anonymous   
Printed Page 612
end of Ex 21-9 under "//tidy up"

under "//tidy up",

streamReader.Close();

should be added with networkStream.Close();

Anonymous