Microsoft Visual C# .NET (Core Reference) Comments and Corrections (320402)



The information in this article applies to:

  • MSPRESS Microsoft Visual C# .NET (Core Reference) ISBN 0-7356-1290-0 1.0

This article was previously published under Q320402

SUMMARY

This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Microsoft Visual C# .NET (Core Reference), ISBN 0-7356-1290-0.

The following topics are covered:
  • CD-ROM: Components Setup Button On Startup Page Does Not Work
  • Page 22: Incorrect Steps For Creating New Project
  • Page 70: Corrections To Code Sample
  • Page 83: Errors In Figure 3-1
  • Page 123: Missing right._hits In Code Sample
  • Page 126: Incorrect Format Of Text Description
  • Page 140: Definition Of For Loop Correction
  • Page 414: Error in Figure 13-6
  • Page 446: Method Should Be Property
  • Page 460: Method Should Be Property
  • Page 687: New Project Wizard Should Be New Project Dialog
  • Page 688: Figure 21-2 Caption Should Read New Project Dialog Box

MORE INFORMATION

CD-ROM: Components Setup Button On Startup Page Does Not Work

During VS.Net Professional Trial DVD setup, selecting the Components Setup link button on the bottom of the startup page results in the following error:

"Could not find the file: drive:\ServerSetup.hta"

This remote component is not supported for the trial SKU, and this error message is expected. This button should be disregarded.

Page 22: Incorrect Steps For Creating New Project

On page 22, change the first sentence of the first paragraph of the section Creating Visual C# Solutions from:
"New projects are created by choosing New Project from the File menu..."

To:
"New projects are created by choosing New and then Project from the File menu..."

Page 70: Corrections To Code Sample

In the code sample at the top of page 70, there are some typographical errors. The fourth line should be omitted, the fifth line should be a comment and the sixth line has a space before the parenthesis that should be removed.

Change:
}
catch(NullReferenceException ex)
{
    // (ex);
Log error information.
    LogError (ex);
    // Rethrow the exception.
    throw(ex);
}
				
To:
}
catch(NullReferenceException ex)
{
    // Log error information.
    LogError(ex);
    // Rethrow the exception.
    throw(ex);
}
				

Page 83: Errors In Figure 3-1

In figure 3-1 on page 83, the declarations for the four methods are not complete.

Three instances of "void Main" should be changed to "static void Main()"

One instance of "void DisplayMsg()" should be changed to "static void DisplayMsg()"

Page 123: Missing right._hits In Code Sample

In the code sample on page 123, in the code performing an AND operation on two batting averages, the final line of code adds left._hits to left._hits. This should be left._hits + right._hits.

Change:
public static BattingAverage operator &(BattingAverage left,
                                        BattingAverage right)
{
    if(left.Average() == 0 || right.Average() == 0)
        return new BattingAverage();
    else
        return new BattingAverage(left._atBats + right._atBats,
                                  left._hits + left._hits); 
}
				
To:
public static BattingAverage operator &(BattingAverage left,
                                        BattingAverage right)
{
    if(left.Average() == 0 || right.Average() == 0)
        return new BattingAverage();
    else
        return new BattingAverage(left._atBats + right._atBats,
                                  left._hits + right_hits); 
}
				

Page 126: Incorrect Format Of Text Description

On page 126, in the sentence immediately preceding the code sample showing conversion of the batting average to a string, the conversion places three digits to the right, not the left, of the decimal point.

Change:
"...ToString method has been overridden first to calculate the batting average and then to format the text as a string in the traditional batting average format, with three digits to the left of the decimal point, as shown here:"

To:
"...ToString method has been overridden first to calculate the batting average and then to format the text as a string in the traditional batting average format, with three digits to the right of the decimal point, as shown here:"

Page 140: Definition Of For Loop Correction

On page 140, the for loop is incorrectly defined as executing until a specified condition becomes true. The execution continues until the specified condition becomes false.

Change:
"The for loop is used to execute a loop until a specified condition becomes true, as follows..."

To:
"The for loop is used to execute a loop until a specified condition becomes false, as follows..."

Page 414: Error in Figure 13-6

On page 414, in figure 13-6, the Status bar is shown under the Client area. The Client area should extend under the Status bar to match the text description.

Page 446: Method Should Be Property

On page 446, in the last two paragraphs of the "Using Brushes" section, there are three instances where the word "method" needs to be replaced with the word "property".

Change:
"For example, if you need a red brush, you call the static Brushes.Red method, like this:

Brush stopBrush = Brushes.Red

Because there's one static method in the Brushes class for each named color, there isn't space to list all the methods here."


To:
"For example, if you need a red brush, you call the static Brushes.Red property, like this:

Brush stopBrush = Brushes.Red

Because there's one static property in the Brushes class for each named color, there isn't space to list all the properties here."

Page 460: Method Should Be Property

On page 460, there are two instances where the term method must be replaced with the term property.

Change:
"For example, to create a red pen, you call the static Pens.Red method, like this:

Pen warningPen = Pens.Red;

All told, there are 141 static methods in the Pens class, ..."


To:
"For example, to create a red pen, you call the static Pens.Red property, like this:

Pen warningPen = Pens.Red;

All told, there are 141 static properties in the Pens class, ..."

Page 687: New Project Wizard Should Be New Project Dialog

On page 687, in the Section "Creating a Web Service",

Change:
"In the New Project Wizard, select ASP.NET Web Service..."

To:
"In the New Project dialog box, in the Templates pane, select ASP.NET Web Service..."

Page 688: Figure 21-2 Caption Should Read New Project Dialog Box

In the caption for figure 21-2 on page 688,

Change:
"New Project Wizard"

To:
"New Project dialog box"

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.

Modification Type:MajorLast Reviewed:10/7/2002
Keywords:kbdocerr kbdocfix kbinfo KB320402