/design-patterns

Design patterns in C#

Primary LanguageC#

Design Patterns

  • These repository follows the 24 Design Patterns stated by Gang Of Four. These patterns are divided in the following categories:
    • Creational: Different ways to create objects;
    • Structural: The relationship between objects;
    • Behavioral: Interaction between objects;

Essentials - OOP features

Encapsulation

  • Bundling the data, and methods that operate on the data within one unit or class, hiding the values or state of an object inside the class.
  • Following this principle we can create robust applications, preventing our objects from going to an invalid state.

Abstraction

  • The abstraction principle says we should hie unnecessary details in our classes. And this helps us reduce complexity.
  • The object only exposes relevant data.

Inheritance

  • Mechanism for reusing code.
  • The process by which one class acquires the properties and the functionalities of another class.

Polymorphism

  • Polymorphism means many forms. Ability of an object to take on many forms. (For example: using abstract methods and classes)