https://github.com/mf-rl/design.patterns.demo
This project provides practical examples of all 23 classic design patterns implemented in C#.
https://github.com/mf-rl/design.patterns.demo
csharp design-patterns design-patterns-csharp design-patterns-example design-patterns-examples examples
Last synced: 5 months ago
JSON representation
This project provides practical examples of all 23 classic design patterns implemented in C#.
- Host: GitHub
- URL: https://github.com/mf-rl/design.patterns.demo
- Owner: mf-rl
- Created: 2025-06-27T03:44:25.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-06-29T18:35:12.000Z (8 months ago)
- Last Synced: 2025-06-29T19:29:11.137Z (8 months ago)
- Topics: csharp, design-patterns, design-patterns-csharp, design-patterns-example, design-patterns-examples, examples
- Language: C#
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Design Patterns in C#
This project provides practical examples of all **23 classic design patterns** implemented in C#.
## 🗂️ Summary Table
| 📂 Category | 🔍 Focus | 💡 Key Idea |
|-------------------|------------------------|----------------------------------------------|
| 🛠️ [Creational](https://github.com/mf-rl/Design.Patterns.Demo/tree/master/Design.Patterns.Demo/1.Creational/README.md) | Object creation | Hide or control object instantiation |
| 🏗️ [Structural](https://github.com/mf-rl/Design.Patterns.Demo/tree/master/Design.Patterns.Demo/2.Structural/README.md) | Object composition | Build flexible and reusable structures |
| 🤝 [Behavioral](https://github.com/mf-rl/Design.Patterns.Demo/tree/master/Design.Patterns.Demo/3.Behavioral/README.md) | Object communication | Manage how objects cooperate and behave |
---
## 📂 Project Structure
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
```
---
## 🚀 Running the Project
1. Open the solution in **Visual Studio**.
2. Build the project.
3. Run the `Program.cs` to see all design pattern examples in action.
---
## 📚 References
- *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! 😊