- Get link
- X
- Other Apps
Below is a fairly straightforward 'fill-in-the-blanks' example of a Builder design pattern: Salient Characteristic(s) Defines a base type Defers creation of type to derived types Code using System; namespace DesignPatterns { //the type of object to be built by the specific builders public class BuilderObject { public string Property1 = string.Empty; public string Property2 = string.Empty; public string Property3 = string.Empty; } abstract class Builder { //protected object to be built protected BuilderObject _Object; //method to return object public BuilderObject GetBuilder() { return _Object; ...