Learn To Program With
C#
McGraw Hill/Osborne
0072-611
Errata and Clarifications
(Last Update: August 24, 2005)
Every author endeavors for perfection. My apologies for the typos that have slipped 
through. We'll do our best to have these corrected for the next printing.
General #1
My thanks to a reader, Bob Whitty, for pointing
this out.
If you have Visual Studio.Net 2003
installed, you need to execute the .Net Batch compiler from within Visual
Studio.Net---not from a Windows Command Prompt.
General #2
My thanks to a reader, Steve, for making this general note about the
book: 
  On page 48, you discuss bringing up a MS-DOS prompt. 
  Since Windows 3.1, it is not  a default desktop shortcut, but it will
  be there if a user creates one. 
  In no version of Windows is an MS-DOS prompt found in the Control Panel. 
  Start > Programs or Start > Programs> Accessories are the places to
  look, depending on the version of Windows. 
  Typing "command" in the Start > Run box, followed by clicking
  "OK" works too (as does typing "cmd" in the Start > Run
  box, followed by clicking "OK" for the Command prompt in Windows
  NT/2000/XP.)
General #3---Compiler Error
If you are having problems getting Windows to
'find' your compiler, check out this tip
provided by one of my readers.
Chapter 1
  - Page 34.  Ward's calculations are correct, but
    his stated percentages are wrong. They should be .25 for the Midterm grade,
    .25 for the Final Examination Grade, .30 for the Research Paper and .20 for
    Class Participation. (My thanks to Gregory Peterson for pointing this out)
Chapter 2
None that we know of
Chapter 3
  - Page 80, Example 3_7. Not
    an errata, but when you compile this program, you will receive two warnings
    telling you that number3 and number4 are never used in your program---that's
    true. No need to worry.
- Page 88, Example 3_9. This
    program will not compile--this is by design, and intentional. 
- Page 102. "A
    result of 1 from the remainder operation indicates an even number and a
    result of 0 from the remainder operation indicates an odd number." This
    should be reversed to say..."A result of 0 from the remainder operation
    indicates an even number and a result of 1 from the remainder operation
    indicates an odd number." 
- Page 115, Example 3_29. No
    output is displayed---this is by design, and intentional. The AND Operation
    evaluates to False.
- Page 119, Example 3_31. No
    output is displayed---this is by design, and intentional. Both sides of the
    OR Operation evaluate to False.
- Page 120, Example 3_33. This
    program will not compile--this is by design, and intentional. 
Chapter 4
  - Page 133, Exercise 4-1, Step 3. Incorrectly
    states to save the source file with an extension of C#. It should be saved
    with an extension of .cs (Thanks Steve)
- Page 160, code example. On
    Page 155, I say that the number 0 is an argument required by the Exit() method which indicates
    a 
 normal termination of the program. In the example, though, I used 1 as the
    argument. This is a typo. A normal return code argument is by convention
    0--although it really could be anything.
Chapter 5
None that we know of
Chapter 6
  - Page 235, Example 6_3.
    This line of code
    
       
Console.WriteLine ("The value of messageDisplayed is " + 1
        should
be
       
Console.WriteLine ("The value of messageDisplayed is "
Chapter 7
  - Page 284, Example 7_1.
    Be sure to compile this program using this compilation directive that
    references both Example7_1 and the Banner class
       
csc Example7_1.cs Banner.cs
       
After you compile the program, observe how large the compiled
Example7_1.exe is. It really contains code from both Example7_1.cs and Banner.cs
Chapter 8
  - Page 331, Example 8_3. Not
    an errata, but when you compile this program, you will receive two warnings
    telling you that Student.SSN and Student.GPA are never used in your program---that's
    true. No need to worry.
- Page 334, Example 8_4. This
    program will not compile--this is by design, and intentional. 
- Page 335, Example 8_5. Not
    an errata, but when you compile this program, you will receive two warnings
    telling you that Student.SSN and Student.GPA are never used in your program---that's
    true. No need to worry.
- Page 337, Example 8_6. This
    program will not compile--this is by design, and intentional. 
- Page 343, Example 8_7. Not
    an errata, but when you compile this program, you will receive two warnings
    telling you that Student.SSN and Student.GPA are never used in your program---that's
    true. No need to worry.
- Page 344, Example 8_8 . Not
    an errata, but when you compile this program, you will receive two warnings
    telling you that Student.SSN and Student.GPA are never used in your program---that's
    true. No need to worry.
- Page 344, Example 8_9 . Not
    an errata, but when you compile this program, you will receive two warnings
    telling you that Student.SSN and Student.GPA are never used in your program---that's
    true. No need to worry.
Chapter 9
None that we know of
Chapter 10
None that we know of
Chapter 11
  - Page 461, Example 11_1. This
    program will not compile--this is by design, and intentional. 
- Page 462, Example 11_2. This
    program will not compile--this is by design, and intentional. 
- Page 463, Example 11_3. This
    program will not compile--this is by design, and intentional. 
- Page 463, Example 11_4. This
    program will not compile--this is by design, and intentional. 
- Page 464, Example 11_5. This
    program will not compile--this is by design, and intentional. 
- Page 465, Example 11_6. This
    program compiles--but when run, the results are less than desirable to
    illustrate a logic error.
- Page 465, Example 11_7. This
    program will not compile--this is by design, and intentional. 
- Page 467, Example 11_9. This
    program will not compile--this is by design, and intentional. 
- Page 468, Example 11_10. This
    program will not compile--this is by design, and intentional. 
- Page 469, Example 11_12. This
    program will not compile--this is by design, and intentional. 
- Page 471, Example 11_14. This
    program will not compile--this is by design, and intentional. 
- Page 471, Example 11_15. This
    program will not compile--this is by design, and intentional. 
- Page 472, Example 11_16. This
    program will not compile--this is by design, and intentional. 
- Page 474, Example 11_17. This
    program will not compile--this is by design, and intentional. 
- Page 475, Example 11_19. This
    program will not compile--this is by design, and intentional. 
- Page 477, Example 11_20. This
    program compiles--but when run, generates a runtime error. This is by
    design.
- Page 484, Example 11_25. This
    program will not compile--this is by design, and intentional. 
Chapter 12
None that we know of 
Chapter 13
  - Page 563, Exercise 13-1. The Calculate() method
    of the EnglishStudent class is missing four lines of code. It should read
    like this...
  
       public void Calculate(int midterm,
                   
    int finalExamGrade,
                   
    int research,
                   
    int presentation) {
    
      Midterm = midterm;
      FinalExamGrade = finalExamGrade;
      Research = research;
      Presentation = presentation;
    
  
Associates
| Books I have written | Bookstore
| C#
| Classes/Seminars/Bootcamps
| Contract
  Programming/Consulting | Free Stuff
 | Help for the beginner
programmer | Java |
 Join Professor Smiley's
Mailing list |
 Join my HelpwithVB group |
Make
  a donation | News| Teaching
| TV appearances
 | Visual Basic
  
  © 1998-2002 Smiley and Associates, Inc.
  Revised - December 14, 2002
 webmaster@johnsmiley.com
  
