Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 1.5 KB

File metadata and controls

75 lines (57 loc) · 1.5 KB

Design Patterns Examples

This repository contains practical examples of various design patterns implemented in C#. Each pattern is implemented in its own independent project, making it easy to understand and run separately.

Project Structure

The solution is organized into different categories of design patterns:

Creational Patterns

  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype
  • Singleton

Structural Patterns

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

Behavioral Patterns

  • Chain of Responsibility
  • Command
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

Getting Started

  1. Clone the repository
  2. Open the solution file in Visual Studio
  3. Select the specific pattern project you want to run
  4. Build and run the project

Prerequisites

  • .NET 8.0 SDK or later
  • Visual Studio 2022 or later

How to Use

Each pattern is implemented in its own project folder with the following structure:

PatternName/
├── Program.cs
├── README.md (Pattern-specific documentation)
└── Implementation files

To run a specific pattern example:

  1. Open the solution in Visual Studio
  2. Set the desired pattern project as the startup project
  3. Press F5 or click Run

Contributing

Feel free to contribute by:

  1. Forking the repository
  2. Creating a new branch
  3. Making your changes
  4. Submitting a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.