摘要:
// 客户端调用 class Client { static void Main(string[] args) { // 创建一个菠菜实例并调用模板方法 Spinach spinach = new Spinach(); spinach.CookVegetabel(); ... 阅读全文
posted @ 2017-05-17 18:33
小小高
阅读(143)
评论(0)
推荐(0)
摘要:
// 客户端调用 class Client { static void Main(string[] args) { // 创建一个代理对象并发出请求 Person proxy = new Friend(); proxy.BuyProduct(); Con... 阅读全文
posted @ 2017-05-17 18:33
小小高
阅读(127)
评论(0)
推荐(0)
摘要:
// 教官,负责调用命令对象执行请求 public class Invoke { public Command _command; public Invoke(Command command) { this._command = command; } public void... 阅读全文
posted @ 2017-05-17 18:31
小小高
阅读(97)
评论(0)
推荐(0)
摘要:
代码中存在多个if-else语句的情况下,此时可以考虑使用责任链模式来对代码进行重构。 阅读全文
posted @ 2017-05-17 18:24
小小高
阅读(150)
评论(0)
推荐(0)
摘要:
用来替换if else 阅读全文
posted @ 2017-05-17 17:34
小小高
阅读(158)
评论(0)
推荐(0)
摘要:
Isnull(null,1); 返回 1 isnull(1,3);返回 3 阅读全文
posted @ 2017-05-17 15:47
小小高
阅读(1930)
评论(0)
推荐(0)

浙公网安备 33010602011771号