| Introduction | ix |
| CHAPTER 1 Writing Your First Object-Oriented Program | 1 |
| Reading Books: Your First Object-Oriented Program 2 / Using the Class View 16 / Creating the ReadBooks Program 22 | |
| CHAPTER 2 Creating Class Instances with Constructors | 29 |
| Constructors 29 / Reading Books: Another Implementation 30 / Reference and Value Types 38 / Understanding Array Declarations 40 | |
| CHAPTER 3 Creating Fields and Properties | 43 |
| Design Considerations for Properties 44 / Code Analysis: A Host of Properties 44 / Code Analysis: Using Indexers and Default Properties 58 | |
| CHAPTER 4 Working with Methods | 71 |
| A Deck of Cards 72 | |
| CHAPTER 5 Using Inheritance to Create Specialized Classes | 105 |
| Inheritance: An Overview 106 / BankAccount: A Simple Example 106 / Inherit from a Control: The RoundButton Class 127 | |
| CHAPTER 6 Designing Base Classes as Abstract Classes | 137 |
| Abstract Classes 138 / The BankAccount Class Revisited 139 / A Typed Collection Class 151 | |
| CHAPTER 7 Responding to Changes with Events and Exceptions | 163 |
| Fire on the Tracks! An Event-Driven Application 164 / Setting Up Event Methods Without Using the Designer 184 / ExceptionsWhen Things Go Wrong 187 | |
| CHAPTER 8 Putting It All Together with Components | 197 |
| The Memory Game 198 / The Games Class Library 201 / The Memory Game Application 232 | |
| CHAPTER 9 Providing Services Using Interfaces | 237 |
| An IMoveable Interface 237 / .NET Framework Interfaces 245 / Two Other Uses of Interfaces 263 | |
| CHAPTER 10 Using Classes Interchangeably Through Polymorphism | 267 |
| Pattern Maker 267 / Pattern Maker Design 268 / The Base Classes 271 / The Derived Classes 273 / The User Interface 285 | |
| CHAPTER 11 Using Shared and Static Members | 293 |
| Shared and Static Members 294 / A More Interesting Point 294 / A More Efficient Card 302 / The Singleton Pattern 309 / Design Considerations 314 | |
| CHAPTER 12 Overloading Operators with Visual C# | 317 |
| A Short Lesson on Vectors 318 / Vector Algebra Application 320 | |
| CHAPTER 13 Saving Instance Data | 331 |
| Serialization 331 / DataSets 348 | |
| CHAPTER 14 Reducing Complexity by Design | 359 |
| The .NET Design Guidelines 360 / Refactoring 368 / Design Patterns 372 | |
| APPENDIX Additional Resources | 377 |
| Books 377 / Organizations 378 | |
| INDEX | 379 |