Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A

Design pattern interview questions with answers

What is Design Pattern?
They are reusable solutions for commonly occurring software development (programming).

Why we need them?

  • Reusability increase the productivity.

  • It brings up the common vocabulary across problems and solutions.

Example – Let’s say a developer stuck with something and he expects a solution from another developer.

Developer 2’s reply – Create a class, create a constructor inside it, make it private, and create a static method inside it…. (Many more steps).

Do you really feel this is the best of giving solution?

Let me ask you a question. What do you call your best friend? A guy with black hair, fairy skin, tall….Or you just call him by his name. People’s name really make our life easy.
In the same way if every solution is named and documented somewhere it will also make our software development life easy.
For instance above solution suggested by developer 2 we call as Singleton design pattern. Next time when someone asks the same question he reply “please implement singleton pattern”.
Easier and better way than talking in terms of classes, methods…etc

How many design patterns there?
There are around 23 design patterns brought up by GOF(Gang of four) categorized into three groups. Creational, Structural and Behavioral. But with time industry, technology everything evolved. Many new patterns introduced like repository pattern. Many got deprecated like iterator pattern.

Is it must to implement design patterns? I mean to say, it is true that for a particular problem we should always implement design pattern?

No, Design pattern should not be used forcefully. It should be altered depending on the problem statement and context we are.

You can also watch the below video on Design pattern’s

Please subscribe to our videos on

For live trainings on Design patterns visit
Tags: csharp interview questions, design pattern interview questions, factory pattern interview questions, it interview questions with answers, programming interview questions

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded