2020年12月11日

设计模式-工厂模式及其改进

摘要: 工厂模式是一种创建型模式,在很多项目中有用到。 案例:我们需要一辆汽车,通过汽车工厂拿到汽车对象。简单工厂模式做法如下 1、先定义接口: using System; using System.Collections.Generic; using System.Linq; using System.T 阅读全文

posted @ 2020-12-11 13:16 CodeTreker 阅读(187) 评论(0) 推荐(0) 编辑

导航