Design Pattern: Builder

前端 未结 4 2011
粉色の甜心
粉色の甜心 2020-12-14 07:43

I have looked for a good example of a Builder pattern (in C#), but cannot find one either because I don\'t understand the Builder pattern o

4条回答
  •  -上瘾入骨i
    2020-12-14 08:13

    Mostly the call of a BuilderPattern looks like this:

    Car car = new CarBuilder().withDoors(4).withColor("red").withABS(true).build();
    

提交回复
热议问题