![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
牛掰是怎么形成的
我爱游戏,我爱编程,我爱技术,我更爱用自己的热情和技术去实现自己的游戏产品。
展开
-
简单工厂设计模式实现计算器的案例
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace 简单工厂模式 { class Program { static void Main(string[] args)原创 2017-11-17 02:16:33 · 606 阅读 · 0 评论 -
简单工厂设计模式实现商店买牙膏收费案例过渡到结合策略模式的理由全解
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace 商城促销__策略模式 { //现金收费抽象类 abstract class CashSuper {原创 2017-11-17 15:41:38 · 376 阅读 · 0 评论 -
送礼物案例搞定代理模式的应用
什么是代理模式呢,其实代理模式是我们造一个代理者,然后和这个代理者去通信,然后这个代理者其实是持有其他对象的,从而我们就可以通过控制这个代理对象而控制了代理对象所持有的对象。//被接受礼物的类 class SchoolGirl { //字段名称 private string name; public string Name { get原创 2017-11-17 18:23:02 · 377 阅读 · 0 评论 -
用造小人让你彻底搞懂什么是建造者设计模式
那么到底什么建造者设计模式呢,当然设计模式其实就是代码一种组织方式。那么我们的造人代码为什么需要这种代码组织结构呢,如果不用会发生什么,用了又会怎么样。using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace原创 2017-11-17 19:33:14 · 1595 阅读 · 0 评论