Skip to content

mf-rl/Design.Patterns.Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Design Patterns in C#

This project provides practical examples of all 23 classic design patterns implemented in C#.

πŸ“‚ 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


πŸ—‚οΈ Summary Table

πŸ“‚ 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

πŸš€ 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! 😊

About

This project provides practical examples of all 23 classic design patterns implemented in C#.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages