Microsoft KB Archive/320402

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

Article ID: 320402

Article Last Modified on 10/7/2002

-

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



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:

&quot;Could not find the file: drive:\ServerSetup.hta&quot;

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:

&quot;New projects are created by choosing New Project from the File menu...&quot;

To:

&quot;New projects are created by choosing New and then Project from the File menu...&quot;

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 &quot;void Main&quot; should be changed to &quot;static void Main&quot;

One instance of &quot;void DisplayMsg&quot; should be changed to &quot;static void DisplayMsg&quot;

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:

&quot;...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:&quot;

To:

&quot;...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:&quot;

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:

&quot;The for loop is used to execute a loop until a specified condition becomes true, as follows...&quot;

To:

&quot;The for loop is used to execute a loop until a specified condition becomes false, as follows...&quot;

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 &quot;Using Brushes&quot; section, there are three instances where the word &quot;method&quot; needs to be replaced with the word &quot;property&quot;.

Change:

&quot;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.&quot;

To:

&quot;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.&quot;

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:

&quot;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, ...&quot;

To:

&quot;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, ...&quot;

Page 687: New Project Wizard Should Be New Project Dialog
On page 687, in the Section &quot;Creating a Web Service&quot;,

Change:

&quot;In the New Project Wizard, select ASP.NET Web Service...&quot;

To:

&quot;In the New Project dialog box, in the Templates pane, select ASP.NET Web Service...&quot;

Page 688: Figure 21-2 Caption Should Read New Project Dialog Box
In the caption for figure 21-2 on page 688,

Change:

&quot;New Project Wizard&quot;

To:

&quot;New Project dialog box&quot;

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.

Additional query words: 0-7356-1290-0 Williams VSTUDIO .NET VC

Keywords: kbinfo kbdocfix kbdocerr KB320402

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.