Here, In this article we will see types of design pattern in C#.
Design Pattern are well-established solutions to common software design problems that developers encounter while building applications. They are not specific pieces of code but rather general reusable templates that can be adapted to solve specific problems in various contexts. Design Patterns help in designing flexible, scalable, and maintainable software.
Design Patterns are broadly categorized into three types.
Creational Patterns - These patterns deal with object creation mechanisms, trying to create objects in a manner suitable for the situation. They help manage the creation process, making it more adaptable and efficient.
Examples - Singleton, Factory Method, Abstract Factory, Builder, PrototypeStructural Patterns - These patterns deal with the composition of classes or objects. They help in forming large structures by composing objects and classes in a way that results in more flexible and efficient design.
Examples - Adapter, Bridge, Composite, Decorator, Facade, Flyweight, ProxyBehavioral Patterns - These patterns deal with communication between objects and how responsibilit ies are distributed among them. They focus on improving communication and assigning clear responsibilities to objects.
Examples - Chain of Responsibility,Command,Interpreter,Iterator,Mediator,Memento,Observer,State,Strategy,Template Method,Visitor