This repository contains implementations of all Gang of Four (GoF) design patterns in C#. The goal of this project is to provide clear and simple examples for each pattern, making it easier for developers to understand and apply them in their projects.
- Abstract Factory
- Builder
- Factory Method
- Prototype
- Singleton
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
Book: Design Patterns: Elements of Reusable Object-Oriented Software (Gang of Four)
-
✅ Improve understanding of design patterns
-
✅ Provide practical and readable examples
-
✅ Help developers improve software design
-
⭐ If you find this helpful, please give it a star ⭐
You can clone this repository and run each pattern independently:
- Clone the repository:
git clone https://github.com/MeltricCode/DesignPatterns.git
- Navigate to the project directory:
cd DesignPatterns - Build and run the project in Visual Studio or via .NET CLI:
dotnet run