Skip to main content

Beginning C# 3.0: An Introduction to Object Oriented Programming

Beginning C# 3.0: An Introduction to Object Oriented Programming

Jack Purdum

ISBN: 978-1-118-05961-6

Jan 2011

552 pages

$25.99

Description

Learn all the basics of C# 3.0 from Beginning C# 3.0: An Introduction to Object Oriented Programming, a book that presents introductory information in an intuitive format. If you have no prior programming experience but want a thorough, easy-to-understand introduction to C# and Object Oriented Programming, this book is an ideal guide. Using the tutorials and hands-on coding examples, you can discover tried and true tricks of the trade, understand design concepts, employ debugging aids, and design and write C# programs that are functional and that embody safe programming practices.
Acknowledgments.

Introduction.

Part I: Getting Started.

Chapter 1: Getting Started.

Chapter 2: Understanding Objects.

Part II: Understanding C# Syntax.

Chapter 3: Understanding Data Types.

Chapter 4: Understanding C# Statements.

Chapter 5: Understanding Reference Data Types.

Chapter 6: Making Decisions in Code.

Chapter 7: Statement Repetition Using Loops.

Chapter 8: Arrays.

Part III: Writing Your Own Classes.

Chapter 9: Designing Classes.

Chapter 10: Designing and Writing Custom Classes.

Chapter 11: Exception Handling and Debugging.

Chapter 12: Generics.

Part IV: Storing Data.

Chapter 13: Using Disk Data Files.

Chapter 14: Using Databases.

Chapter 15: Inheritance and Polymorphism.

Appendix A: Exercise Solutions.

Index.

Chapter Code Downloads
There is no code for Chapters 1 and 4.
Download
Code for listing 5-2
Download
ChapterPageDetailsDatePrint Run
238Error in Text
The paragraph under Figure 2-10 instructs the reader to click the

OK button

But it should be

Add button
02/17/09

43Error in Table
In the table on page 43, it should be txtDisplayOutput instead of txtResult.

The code is correct as is the narrative. Only the table is wrong.
05/21/2008

44Error in Code
City: + txtAddress.Text +

should be:
City: + txtCity.Text +
AND

Mail Label program needs to include the ' this.Close' click event --

Author replies: Because the code for the Exit button is the same for every program in the book, and is only one statement (i.g., Close()), it isn't printed in the book. However, it is in the download code for the program.
06/26/2008

65Error in Code
as larget as e<sup>38</sup>

should be:

as larget as 10<sup>38</sup>
6/23/2008

116Typo in Text
peoples'

Should be

people's
2/3/09

120Error in Text
In the last paragraph before the Replacing a Substring section on the page:

its Text property to the new string

Should be

the new string to its Text property
2/3/09

138Typo in Text
Near the end of the largest paragraph on the page:

TryParse()

Should be

TryPrase()
2/4/09

144Error in Code
In the code after the ?Nested If Statements? heading, the code says

Price = FULLPRICE; If (age => 21)

But it should say ?>=? not ?=>?
06/25/2008

150/151Clarification
case 1 repeated should be case 1, case 2, case 3,....
06/23/2008

151Error in Code
The code at the top of the page should contain several cases for the switch statement. Your code has a switch statement with three ?case 1?s.
06/25/2008

252Typo in Code Comment
The comment in the code:

// Is this card place in the deck is unused ?

Should be:

// Is this card place in the deck unused ?
02/17/09

301Error in Code
second line of code from the bottom says:

mySort.quickSort(data.Length-1); // Sort the data

The function quickSort takes two parameters and it should be

mySort.quickSort(0, data.Length-1); // Sort the data
06/25/2008

467Error in Code
If (answer == 0)

Should be:

if (answer == 0)
06/09/08

469Error in Code
Page 469 requires the following 2 lines for the code to serve its purpose:

if (birthday.DayOfYear > currentDate.DayOfYear)

age -= 1;
11/24/08

472Error in Code
const int FOURPOUNDS = 48;

should be

const int FOURPOUNDS = 64;

because there are 16 ounces in a pound, not 12
02/06/09

8474Error in Code
The code on page 474 generates inaccurate numbers. The code should read:

start--; // This is the new line

female = 3.5 * start - 108

male = 4.0 * start - 128

11/24/08

Typo in Source Code
In the readme.txt file in the zip archive, from chapter 5 and below:

Contians

Should be

Contains
2/6/09