| |
| |
Introduction | |
| |
| |
Week 1 At a Glance | |
| |
| |
| |
Getting Started with C# | |
| |
| |
What Is C#? Preparing to Program | |
| |
| |
The Program-Development Cycle | |
| |
| |
Creating Your First C# Program | |
| |
| |
Types of C# Programs | |
| |
| |
Creating Your First Window Application | |
| |
| |
Why C#? A High-Level View of | |
| |
| |
.NET. C# and Object-Oriented Programming (OOP) | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
Type & Run 1. Numbering Your Listings. The First Type & Run | |
| |
| |
| |
Understanding C# Programs | |
| |
| |
Dissecting a C# Application | |
| |
| |
Basic Parts of a C# Application | |
| |
| |
Exploring the Structure of a C# Application | |
| |
| |
Analyzing Listing | |
| |
| |
| |
Storing Information with Variables | |
| |
| |
Using Your Variables | |
| |
| |
Understanding Your Computer''s Memory | |
| |
| |
Introducing the C# Data Types | |
| |
| |
Numeric Variable Types | |
| |
| |
Literals Versus Variables | |
| |
| |
Creating Constants | |
| |
| |
A Peek at Reference Types | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Manipulating Values in Your Programs | |
| |
| |
Displaying Basic Information | |
| |
| |
Manipulating Variable Values with Operators | |
| |
| |
Understanding Punctuators | |
| |
| |
Moving Values with the Assignment Operator | |
| |
| |
Working with Mathematical/Arithmetic Operators | |
| |
| |
Making Comparisons with Relational Operators | |
| |
| |
Understanding Logical Bitwise Operators | |
| |
| |
Understanding the Type Operators | |
| |
| |
Using the sizeof Operator | |
| |
| |
Shortcutting with the Conditional Operator | |
| |
| |
Understanding Operator Precedence | |
| |
| |
Converting Data Types | |
| |
| |
Understanding Operator Promotion | |
| |
| |
Bonus Material: For Those Brave Enough | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Controlling Your Program''s Flow | |
| |
| |
Controlling Program Flow | |
| |
| |
Using Selection Statements | |
| |
| |
Using Iteration Statements | |
| |
| |
Reviewing goto | |
| |
| |
Nesting Flow | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
Type & Run 2. Guess the Number! | |
| |
| |
The Guess Type & Run | |
| |
| |
The WinGuess Type & Run | |
| |
| |
| |
The Core of C# Programming: Classes | |
| |
| |
Digging into Object-Oriented Programming | |
| |
| |
Defining a Class | |
| |
| |
Declaring Classes | |
| |
| |
Working with Data Members, a.k.a. Fields | |
| |
| |
Using Static Variables | |
| |
| |
Inspecting the Application Class | |
| |
| |
Creating Properties | |
| |
| |
A First Look at Namespaces | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Packaging Functionality: Class Methods and Member Functions | |
| |
| |
Getting Started with Methods | |
| |
| |
Using Methods | |
| |
| |
Understanding Program Flow with Method | |
| |
| |
Exploring the Format of a Method | |
| |
| |
Passing Values to Methods | |
| |
| |
Types of Class Methods | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Storing More Complex Stuff: Structures, Enumerators, and Arrays | |
| |
| |
Working with Structures | |
| |
| |
Clarifying with Enumerators | |
| |
| |
Using Arrays to Store Data | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
Week 1 Week in Review | |
| |
| |
The WR01.cs Program | |
| |
| |
Week 2. Week at a Glance | |
| |
| |
| |
Advanced Method Access | |
| |
| |
Overloading Methods | |
| |
| |
Using a Variable Number of Parameters | |
| |
| |
Understanding Scope | |
| |
| |
Creating Classes with No Objects | |
| |
| |
Revisiting Namespaces | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Handling Problems in Your Programs: Exceptions and Errors | |
| |
| |
Understanding the Concept of Handling Problems | |
| |
| |
Exception Handling | |
| |
| |
Adding Finality with finally | |
| |
| |
Common Exceptions | |
| |
| |
Defining Your Own Exception Classes | |
| |
| |
Throwing Your Own Exceptions | |
| |
| |
Using checked Versus unchecked Statements | |
| |
| |
What Is Debugging? Understanding the Types of Errors | |
| |
| |
Finding Errors | |
| |
| |
Tracing Code with Code Walkthroughs | |
| |
| |
Working with Preprocessor Directives | |
| |
| |
Using Debuggers | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
Type & Run 3. Lines and Circles and Squares, "Oh My!" | |
| |
| |
| |
Reusing Existing Code with Inheritance | |
| |
| |
Understanding the Basics of Inheritance | |
| |
| |
Exploring Polymorphism and Inherited Classes | |
| |
| |
Working with Virtual Methods | |
| |
| |
Working with Abstract Classes | |
| |
| |
Sealing Classes | |
| |
| |
The Ultimate Base Class: Object | |
| |
| |
Using the is and as Keywords with Classes-Class Conversions | |
| |
| |
Working with Arrays of Different Object Types | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Formatting Formatting and Retrieving Information | |
| |
| |
Understanding Console Input and Output | |
| |
| |
Formatting Information | |
| |
| |
Working More Closely with Strings | |
| |
| |
Getting Information from the Console | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Tapping into OOP: Interfaces | |
| |
| |
Interfaces: A First Look | |
| |
| |
Using Interfaces | |
| |
| |
Defining Interfaces | |
| |
| |
Using Multiple Interfaces | |
| |
| |
Using Explicit Interface Members | |
| |
| |
Deriving New Interfaces from Existing Ones | |
| |
| |
Hiding Interface Members | |
| |
| |
Summary | |
| |
| |
Q & A | |
| |
| |
Workshop | |
| |
| |
| |
Ma | |