Part 1: Object-Oriented Programming in C#
Chapter 1. What Are Design Patterns?
Notes on Object-Oriented Approaches
Chapter 2. Syntax of the C# Language
Converting between Numbers and Strings
Declaring Variables as You Use Them
Multiple Equal Signs for Initialization
Increment and Decrement Operators
Combining Arithmetic and Assignment Statements
Declaring Variables as Needed in For Loops
Chapter 3. Writing Windows C# Programs
Managed Languages and Garbage Collection
The Simplest Window Program in C#
Chapter 4. Using Classes and Objects in C#
A Simple Temperature Conversion Program
Putting the Decisions into the Temperature Class
Using Classes for Format and Value Conversion
Creating a Square from a Rectangle
Public, Private, and Protected
Overriding Methods in Derived Classes
Comparing Interfaces and Abstract Classes
Chapter 7. Arrays, Files, and Exceptions in C#
Chapter 8. The Simple Factory Pattern
Factory Patterns in Math Computation
Chapter 10. The Abstract Factory Pattern
Handling the RadioButton and Button Events
Consequences of Abstract Factory
Chapter 11. The Singleton Pattern
Creating Singleton Using a Static Method
Creating an Instance of the Class
Providing a Global Point of Access to a Singleton
Other Consequences of the Singleton Pattern
Chapter 12. The Builder Pattern
Using the Items Collection in the ListBox Control
Consequences of the Builder Pattern
Chapter 13. The Prototype Pattern
Dissimilar Classes with the Same Interface
Consequences of the Prototype Pattern
Summary of Creational Patterns
Chapter 14. The Adapter Pattern
Object versus Class Adapters in C#
Chapter 15. The Bridge Pattern
Consequences of the Bridge Pattern
Chapter 16. The Composite Pattern
An Implementation of a Composite
Consequences of the Composite Pattern
Chapter 17. The Decorator Pattern
Handling Events in a Decorator
Decorators, Adapters, and Composites
Consequences of the Decorator Pattern
Chapter 18. The Façade Pattern
Reading Data from a Database Table
Deleting the Contents of a Table
Adding Rows to Database Tables Using ADO.NET
Creating Classes for Each Table
Chapter 19. The Flyweight Pattern
Handling the Mouse and Paint Events
Comparison with Related Patterns
Summary of Structural Patterns
Chapter 21. Chain of Responsibility
Chapter 22. The Command Pattern
Consequences of the Command Pattern
Chapter 23. The Interpreter Pattern
Implementing the Interpreter Pattern
Consequences of the Interpreter Pattern
Chapter 24. The Iterator Pattern
Consequences of the Iterator Pattern
Chapter 25. The Mediator Pattern
Consequences of the Mediator Pattern
Chapter 26. The Memento Pattern
Command Objects in the User Interface
Handling Mouse and Paint Events
Chapter 27. The Observer Pattern
Consequences of the Observer Pattern
How the Mediator Interacts with the StateManager
The VisRectangle and VisCircle Classes
Consequences of the State Pattern
Chapter 29. The Strategy Pattern
The Line and Bar Graph Strategies
Consequences of the Strategy Pattern
Chapter 30. The Template Method Pattern
Kinds of Methods in a Template Class
Chapter 31. The Visitor Pattern
When to Use the Visitor Pattern
Catch-All Operations with Visitors
Traversing a Series of Classes