Microsoft Visual C# 2005 Step by Step Comments and Corrections (905035)



The information in this article applies to:

  • Microsoft Visual C# 2005 Step by Step, ISBN 0-7356-2129-2

SUMMARY

This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Microsoft Visual C# 2005 Step by Step, ISBN 0-7356-2129-2.

The following topics are covered:

  • Incorrect pathway to practice file locations
  • Page 27: 2 to the 16th power represented as 32,768 rather than 65,536
  • Page 27: Eight exponents not printed as exponents
  • Page 33: Math error
  • Page 40: -- operator not printed correctly
  • Page 52, Item #7 has missing parenthesis
  • Page 60: Incorrect operator in Table
  • Page 61: Error in sample code
  • Page 79: OpenFileDialog class referenced in place of FileInfo class
  • Page 167: Variable name Summer used in place of Spring in example code
  • Page 276: Sample code error
  • Page 322: Error in code in step 6

MORE INFORMATION

Incorrect pathway to practice file locations

In the book, all references to the path:

"My Documents\Visual C Sharp Step by Step"

should read:

"My Documents\Microsoft Press\Visual C Sharp Step by Step"

Page 27: 2 to the 16th power represented as 32,768 rather than 65,536

On page 27, the line immediately below the table reads:

"* The value of 216 is 32,768; the value of 231 is 2,147,483,648; and the value of 263 is 9,223,372,036,854,775,808."

With numerals in parentheses indicating exponents, it should read:

"* The value of 2(16) is 65,536; the value of 2(31) is 2,147,483,648; and the value of 2(63) is 9,223,372,036,854,775,808."

Page 27: Eight exponents not printed as exponents

On page 27, there are eight occurances of exponents not printed as such. All numerals enclosed in parenthesis in the corrections below should be printed in the exponent position.

The Range column of the int row in the table reads:

"<->231 through 231<->1"

It should read:

"<->2(31) through 2(31)<->1"

The Range column of the long row in the table reads:

"<->263 through 263<->1"

It should read:

"<->2(63) through 2(63)<->1"

The Range column of the char row in the table reads:

"0 through 216 <->1"

It should read:

"0 through 2(16) <->1"

The line immediately below the table reads:

"* The value of 216 is 32,768; the value of 231 is 2,147,483,648; and the value of 263 is 9,223,372,036,854,775,808."

It should read:

"* The value of 2(16) is 32,768; the value of 2(31) is 2,147,483,648; and the value of 2(63) is 9,223,372,036,854,775,808."

Page 33: Math error

On page 33, within the modules example, the row above the note currently reads:

"9 divided by 2 is 8, remainder 1"

It should read:

"9 divided by 2 is 4, remainder 1"

Page 40: -- operator not printed correctly

On page 40, the "Increment or decrement a variable" section of the Chapter 2 Quick Reference table reads:

"Use the ++ or <;$MI><;$MI> operator. For example:
count++;"

It should read:

"Use the ++ or -- operator. For example:
count++;"

Page 52, Item #7 has missing parenthesis

On Page 52, in Item #4, the last row from the bottom reads:

"private double calculateFee double dailyRate, int noOfDays)"

It should read:

"private double calculateFee(double dailyRate, int noOfDays)"

Page 60: Incorrect operator in Table

On Page 60, in the first table under 'Understanding Equality and Relational Operations', there are incorrect entries in the first row in the 'Operator' and 'Example' columns.

In the Operator column, replace:
--

with
==

In the Example column, replace:
age -- 100

with
age == 100

Page 61: Error in sample code

On page 61, within the TIP, the second line of sample code reads:
validPercentage = percent >=0 && percent <= 100 validPercentage = (percent >=0) && (percent <=100)

It should read:
validPercentage = percent >=0 && percent <= 100

and

validPercentage = (percent >=0) && (percent <=100)


Page 79: OpenFileDialog class referenced in place of FileInfo class

On page 79, the fourth sentence in the second paragraph of step 9 reads:

"The OpenFileDialog class provides the OpenText method for opening the file selected by the user in the Open dialog."

It should read:

"The FileInfo class provides the OpenText method for opening the file selected by the user in the Open dialog."

Page 167: Variable name Summer used in place of Spring in example code

On page 167, the first line of sample code in the "Initialize or assign an enumeration variable to a value" section of the Chapter 9 Quick Reference table reads:

currentSeason = Season; // compile time error


It should read:

currentSeason = Spring; // compile time error


Page 276: Sample code error

On page 276, the second-to-last code sample contains an error. Beginning with the sentence immediately preceding the code sample, it reads:
"You can remove a method from a delegate by using the -= operator:

this.stopMachinery += folder.StopFolding; "

It should read:
"You can remove a method from a delegate by using the -= operator:

this.stopMachinery -=folder.StopFolding;"


Page 322: Error in code in step 6

On page 322, the code sample reads:
foreach (int data in tree1)
Console.WriteLine(data);


The code sample should have the second line indented:
foreach (int data in tree1)
   Console.WriteLine(data);




Microsoft Press is committed to providing informative and accurate books. All comments and corrections listed above are ready for inclusion in future printings of this book. If you have a later printing of this book, it may already contain most or all of the above corrections.

The print number of the book is located on the copyright page in the form of a string of numbers. For example: "2 3 4 5 6 7 8 0 QWT 9 8 76 5 4". The first number in the string is the the print number. In this example, the print number is 2.

Modification Type:MinorLast Reviewed:9/20/2006
Keywords:kbinfo kbdocerr KB905035 kbAudEndUser