This project provides practical examples of all 23 classic design patterns implemented in C#.
📂 Category | 🔍 Focus | 💡 Key Idea |
---|---|---|
🛠️ Creational | Object creation | Hide or control object instantiation |
🏗️ Structural | Object composition | Build flexible and reusable structures |
🤝 Behavioral | Object communication | Manage how objects cooperate and behave |
The project is organized into three main categories:
DesignPatternsDemo/
│
├── 1.Creational/
│ ├── A.Singleton
│ ├── B.Factory Method
│ ├── C.Abstract Factory
│ ├── D.Builder
│ └── E.Prototype
│
├── 2.Structural/
│ ├── A.Adapter
│ ├── B.Bridge
│ ├── C.Composite
│ ├── D.Decorator
│ ├── E.Facade
│ ├── F.Flyweight
│ └── G.Proxy
│
└── 3.Behavioral/
│ ├── A.Chain of Responsibility
│ ├── B.Command
│ ├── C.Interpreter
│ ├── D.Iterator
│ ├── E.Mediator
│ ├── F.Memento
│ ├── G.Observer
│ ├── H.State
│ ├── I.Strategy
│ ├── J.Template Method
│ └── K.Visitor
- Open the solution in Visual Studio.
- Build the project.
- Run the
Program.cs
to see all design pattern examples in action.
- Design Patterns: Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, and Vlissides (Gang of Four)
Feel free to explore each pattern folder to understand their individual implementations. Happy learning! 😊