/designpatterns

Design Patterns in C#

Primary LanguageC#MIT LicenseMIT

Design Patterns in C#

Design Patterns

Table of Contents

Introduction

This project demonstrates various design patterns implemented in C#. Design patterns are typical solutions to common problems in software design. They are best practices that the programmer can use to solve common problems when designing an application or system.

Design Patterns Implemented

  1. Creational Patterns

    • Singleton
    • Factory Method
    • Abstract Factory
    • Builder
    • Prototype
  2. Structural Patterns

    • Adapter
    • Bridge
    • Composite
    • Decorator
    • Facade
    • Flyweight
    • Proxy
  3. Behavioral Patterns

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

Getting Started

Prerequisites

Ensure you have the following installed:

  • .NET Core SDK 8 or later
  • Visual Studio 2022 or later (or any other compatible IDE)

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any improvements or additional patterns you'd like to add.

  • Fork the repository
  • Create your feature branch (git checkout -b feature/NewPattern)
  • Commit your changes (git commit -m 'Add some NewPattern')
  • Push to the branch (git push origin feature/NewPattern)
  • Open a pull request