Microsoft KB Archive/815369

= Microsoft Visual C# .NET Step by Step Version 2003 Comments And Corrections =

Article ID: 815369

Article Last Modified on 8/12/2005

-

APPLIES TO


 * MSPRESS Microsoft Visual C# .NET Step by Step Version 2003, ISBN 0-7356-1909-3

-



SUMMARY
This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Microsoft Visual C# .NET Step by Step Version 2003, 0-7356-1909-3.

The following topics are covered:


 * Page 111: Error In Code Sample
 * Page 136: Incorrect Statement
 * Page 136: Incorrect Statement
 * Page 148: Incorrect Statement Regarding Unboxing
 * Page 313: Error In Code Sample
 * Page 387: bellRingersTree Should Be bellRingersList
 * Page 448: Missing Step In Instructions
 * Page 461-462: Missing Two Steps
 * Page 467: Missing Step
 * Page 505: Incorrect Information Regarding Control Panel
 * Page 510: Incorrect Label1 Values
 * Page 549: &quot;Customer.aspx.cs&quot; Should Be &quot;CustomerData.aspx.cs&quot;
 * Page 589: UnitPrice Should Be 18
 * Page 609: Capitalization Error
 * Page 609: Capitalization Error
 * Page 609: Capitalization Error



Page 111: Error In Code Sample
On page 111, there is an error in the &quot;Catch all exceptions in a single catch handler&quot; example in the middle of the page.

Change:

&quot;try {. } catch (Exception caught) {. }&quot;

To:

&quot;try {. } catch (System.Exception caught) {. }&quot;

Page 136: Incorrect Statement
On page 136, there is an error in the fourth sentence of the third paragraph.

Change:

&quot;If you choose to initialize or assign refc to c, refc will hold the same Circle object that c does; there is only one Circle object, and refc and c both refer to it.&quot;

To:

&quot;If you choose to initialize or assign c to refc, refc will hold the same Circle object that c does; there is only one Circle object, and refc and c both refer to it.&quot;

Page 136: Incorrect Statement
On page 136, there is an error in the third sentence of the second paragraph.

Change:

&quot;If you choose to initialize or assign copyi to i, copyi will hold the same value as i.&quot;

To::

&quot;If you choose to initialize or assign i to copyi, copyi will hold the same value as i.&quot;

Page 148: Incorrect Statement Regarding Unboxing
On page 148, there is an error in the last sentence of the first paragraph.

Change:

&quot;You have seen how assigning a variable of a value type to a variable of the System.Object class causes the boxed copy to refer to a variable of a value type (such as int).&quot;

To:

&quot;You have seen how assigning a variable of a value type with a variable of the System.Object class causes the boxed data to be extracted from the heap and be used to initialize the value type variable.&quot;

Page 313: Error In Code Sample
On page 313, there is an error in the code sample.

Change:

struct Hour {   public static implicit operator int (Hour from) {       return value; }   private int value; }

TO:

struct Hour {   public static implicit operator int (Hour from) {       return from.value; }   private int value; }

Page 387: bellRingersTree Should Be bellRingersList
There is an error in Step 3 on page 387.

Change:

&quot;Set the SmallImageList property of bellRingersTree to&quot;

To:

&quot;Set the SmallImageList property of bellRingersList to&quot;

Page 448: Missing Step In Instructions
There is a step missing between the first and second sentences of step 2 located on Page 449. The name property should also be in parenthesis.

Change:

&quot;In the Solution Explorer, change the name of Class1.cs to Report.cs. In the Properties window, change the name of the Class1 class to Report.&quot;

To:

&quot;In the Solution Explorer, change the name of Class1.cs to Report.cs. Click on the Class View tab, and select the Class1 class. In the Properties window, change the (name) property of the Class1 class to Report.&quot;

Page 461-462: Missing Two Steps
There are missing steps on pages 461 and 462.

Change step 6 on Page 461 to:

&quot;6 Add the following statements to the button1_Click method:

button1.Text = &quot;Hello&quot;;

textBox1.Focus;

button1.Focus;

These statements change the caption that appears on the button, switches the focus over to the textbox control so it can update its display, and switches the focus back to the button..&quot;

Change step 8 on Page 462 to:

&quot;8 Click the button. The button's caption changes to &quot;Hello.&quot; The contents of the textbox change to &quot;Hello&quot; as well. The data binding causes any changes you make to the bound property to be propagated back to the original data source and vice versa.&quot;

Page 467: Missing Step
There is a step missing from page 467.

Insert the following as a new Step 5:

&quot;5 Select the textbox control on the form by clicking on it.

The Properties window should now display the events associated with the textbox control. If not, click on the Events button to display them. Click the Enter event, and then click on the drop down arrow. Select itemSelected from the drop down list and hit enter. You will be returned to the itemSelected method in the Code View window but you don't have to type anything.

After the form and its controls are created the textbox control receives the focus which generates the Enter event. By pointing that event to the itemSelected method we ensure the textbox displays a ProductID when the program starts.&quot;

The remaining step numbers should be incremented by one.

Page 505: Incorrect Information Regarding Control Panel
The Important note at the bottom of Page 505, fourth sentence, contains incorrect information.

Change:

&quot;(If your computer is running Microsoft Windows XP with the Windows XP theme, in the Control Panel, click Performance and Maintenance.)&quot;

To:

&quot;(If your computer is running Microsoft Windows XP, and the Control Panel is set to display in Category View, then click on the &quot;Performance and Maintenance&quot; category.)&quot;

Page 510: Incorrect Label1 Values
The Width and Height values on page 510 correspond to the Width and Height of the label on the form called &quot;Label1.&quot; According to the table on the bottom of Page 508 the Label1 control should have a Height of 36px, and Width of 630px.

Change:

&quot;Font-Size=&quot;X-Large&quot; Width=&quot;712px&quot; Height=&quot;46px&quot;>&quot;

To:

Font-Size=&quot;X-Large&quot; Width=&quot;630px&quot; Height=&quot;36px&quot;>

Page 549: &quot;Customer.aspx.cs&quot; Should Be &quot;CustomerData.aspx.cs&quot;
There is an error in the first sentence of Step 1 on Page 549.

Change:

&quot;Display Customer.aspx.cs in the Code and Text Editor window.&quot;

To:

&quot;Display CustomerData.aspx.cs in the Code and Text Editor window.&quot;

Page 589: UnitPrice Should Be 18
There is an error in the middle of the XML statements on Page 589.

Change:

&quot;23&quot;

To:

&quot;18&quot;

Page 609: Capitalization Error
There is a capitalization error in the third program instruction line in Step 3 located at the top of Page 609.

Change:

&quot;totalCost.Text = totCost.ToString;&quot;

To:

&quot;TotalCost.Text = totCost.ToString;&quot;

Page 609: Capitalization Error
There is a capitalization error in the sixth program instruction line in Step 4 located in the middle of Page 609.

Change:

&quot;productService.BeginHowMuchWillItCost(productName.Text,&quot;

To:

&quot;productService.BeginHowMuchWillItCost(ProductName.Text,&quot;

Page 609: Capitalization Error
There is a capitalization error in the seventh program instruction line in Step 4 located in the middle of page 609.

Change:

&quot;Int32.Parse(numberRequired.Text), callback,&quot;

To:

&quot;Int32.Parse(NumberRequired.Text), callback,&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-1909-3

Keywords: kbdocfix kbdocerr KB815369

-

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

© Microsoft Corporation. All rights reserved.