According to Gang of Four, a creational pattern “Builder” allows to separate and reuse a specific method to build something. Use Case Lets us take an example of a Car, and the user wanted to build two models, i.e., SUV and Sedan. Builder design pattern comes in handy in the above use case, and let's see a step-by-step demonstration. And let's assume the Car class has the following properties. { Name { ; ; } TopSpeed { ; ; } IsSUV { ; ; } } public class Car public string get set public double get set public bool get set Prerequisites Basic knowledge of OOPS concepts.Any programming language knowledge. The article demonstrates the usage of builder design patterns using the programming language. So, to begin with, C# Intro C# Getting Started Firstly, let’s implement an abstract class builder extended by different car models like SUV or Sedan as per use case. The abstract class consists of the following methods { Car _car = Car(); ; ; ; => _car; } public abstract class CarBuilder protected readonly new ( ) public abstract void SetName ( ) public abstract void SetSpeed ( ) public abstract void SetIsSUV Car ( ) public virtual GetCar Abstract methods for each property of the Car class. A virtual method that outputs the Car class instance. Now, let’s create a factory that utilizes CarBuilder class to build different car models and returns the instance of the car made. { { builder.SetName(); builder.SetSpeed(); builder.SetIsSUV(); builder.GetCar(); } } public class CarFactory Car ( ) public Build CarBuilder builder return Finally, implement different models of cars. Firstly, ModelSuv.cs public { public override SetIsSUV() { _car.IsSUV = ; } public override SetName() { _car.Name = ; } public override SetSpeed() { _car.TopSpeed = ; } } : class ModelSuv CarBuilder void true void "Maruti SUV" void 1000 Lastly, ModelSedan.cs : { { _car.IsSUV = ; } { _car.Name = ; } { _car.TopSpeed = ; } } public class ModelSedan CarBuilder ( ) public override void SetIsSUV false ( ) public override void SetName "Maruti Sedan" ( ) public override void SetSpeed 2000 How to use builder pattern from the Main() method Finally, let's use design patterns to build different car models with the help of method. factory.Build(<model>) { sedan = ModelSedan(); suv = ModelSuv(); factory = CarFactory(); builders = List<CarBuilder> { suv, sedan }; ( b builders) { c = factory.Build(b); Console.WriteLine( + + + + ); } } ( ) static void Main [] args string var new var new var new var new foreach var in var $"The Car details" $"\n--------------------------------------" $"\nName: " {c.Name} $"\nIs SUV: " {c.IsSUV} $"\nTop Speed: mph\n" {c.TopSpeed} The above usage shows how gracefully we can build different car models using the builder design pattern. The code pattern is highly maintainable & extensible. If in the future if we need to develop a new model, just the new model needs to extend the CarBuilder class, and it's done. Output Github Repo The following repository shows the above use case implementation using a Builder Design Pattern in the console-based application. ssukhpinder/BuilderPattern Thank you for reading, and I hope you liked the article. Please provide your feedback in the comment section. Also published on: https://medium.com/c-sharp-progarmming/builder-design-pattern-13af2c7bc5f2