2021年6月25日

简单工厂模式

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace DesignPatt 阅读全文

posted @ 2021-06-25 09:23 HowieGo 阅读(29) 评论(0) 推荐(0)

单例模式

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace DesignPatt 阅读全文

posted @ 2021-06-25 09:21 HowieGo 阅读(28) 评论(0) 推荐(0)

C#设计模式总纲

摘要: 使用设计模式的根本原因:代码总是在不断地变化,使用设计模式可以刚好的适应变化,提高代码的复用性,使代码更容易维护和扩展。 SOLID单一职责原则:类应该保持单一的职责,若包含多个职责可能会形成耦合,职责改变时就可能影响到其他职责,影响类本身的稳定性和代码复用性。 开放封闭原则:软件实体包括类类,函数 阅读全文

posted @ 2021-06-25 09:20 HowieGo 阅读(88) 评论(0) 推荐(0)

导航