
C#设计模式
闻人放歌
这个作者很懒,什么都没留下…
展开
-
C#迭代器的实现
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace iterator { abstract class ITerator//创建抽象迭代接口 { publi原创 2016-12-05 10:58:52 · 641 阅读 · 0 评论 -
C#设计模式——解释器模式
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Explaining{ public class Translaton { public static string原创 2016-12-05 11:02:49 · 645 阅读 · 0 评论 -
C#设计模式扩展——Meditor+Proxy模式实现
这里我们做一个简单的设计模式的组合,中介者模式+代理模式。代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ProxyAndMeditor0922{ public class Age原创 2016-12-05 11:10:55 · 415 阅读 · 0 评论 -
C#设计模式——状态模式
今天我来说下状态模式。状态模式用处多多,可以实现状态的切换,废话不多说,代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace StateModel{ public class Defic原创 2016-12-05 11:15:57 · 1416 阅读 · 1 评论 -
C#设计模式——观察者模式!
观察者模式是使用频率非常非常高的设计模式,在MVC框架中也会经常用到,重中之重,必须掌握!using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ObservePingPongBall{ publi原创 2016-12-05 11:25:36 · 361 阅读 · 0 评论