Design Patterns in C#

What is design Pattern in c#?
Design Patterns are categorized into 3 types and they are:
  1. Creational Design Patterns.
  2. Structural Design Patterns.
  3. Behavioral Design Patterns.
What are Creational Design Patterns?
These patterns deal with the process of objects creation. The flowing are the different types of Creational Design patterns.
  1. Abstract Factory Pattern - Createinstances of several classes belonging to different families.
  2. Factory Pattern - Create instances ofderived classes.
  3. Builder Pattern - Separates an objectconstruction from its representation.
  4. Lazy Pattern - Create a duplicate objector clone of the object.
  5. Prototype Pattern - Specify the kind ofobjects to create using a prototypical instance, and create new objects bycopying this prototype.
  6. Singleton Pattern - Ensures that a classcan have only one instance.
What are Structural Design Patterns?
These patterns deal with the composition of objects structures. The flowing are the different types of Structural Design patterns.
  1. Adapter Pattern - Interfaces of classesvary depending on the requirement.
  2. Bridge Pattern - Class level abstractionis separated from its implementation.
  3. Composite Pattern - Individual objects &a group of objects are treated similarly in this approach.
  4. Decorator Pattern - Functionality isassigned to an object.
  5. Facade Pattern - A common interface iscreated for a group of interfaces sharing a similarity.
  6. Flyweight Pattern - The concept ofsharing a group of small sized objects.
  7. Proxy Pattern - When an object iscomplex and needs to be shared, its copies are made. These copies are calledthe proxy objects.
What are Behavioral Design Patterns?
These patterns deal with the process of communication, managing relationships, and responsibilities between objects. The flowing are the different types of Behavioral Design patterns.
  1. Chain Or Responsibilities Pattern - Inthis pattern, objects communicate with each other depending on logicaldecisions made by a class.
  2. Command Pattern - In this pattern,objects encapsulate methods and the parameters passed to them.
  3. Observer Pattern - Define a one-to-manydependency between objects so that when one object changes state, all itsdependents are notified and updated automatically.
  4. Interpreter Pattern - A way to includelanguage elements in a program.
  5. Iterator Pattern - Provide a way toaccess the elements of an aggregate object sequentially without exposing itsunderlying representation.
  6. Mediator Pattern - Define an object thatencapsulates how a set of objects interact. In other words, it definessimplified communication between classes.
  7. Memento Pattern - Without violatingencapsulation, capture and externalize an object's internal state so thatthe object can be restored to this state later.
  8. State Pattern - Allow an object to alterits behavior when its internal state changes. The object will appear tochange its class.
  9. Strategy Pattern - Define a family ofalgorithms, encapsulate each one, and make them interchangeable. Strategylets the algorithm vary independently from clients that use it.
  10. Visitor Pattern - Defines a newoperation to a class without change.
  11. Template Method Pattern - Defer theexact steps of an algorithm to a subclass.

Next Recommended Reading Factory Design Pattern In C#