摘要: (1)过长代码(2)重复代码 阅读全文
posted @ 2015-12-16 11:38 ~huiChen~ 阅读(175) 评论(0) 推荐(0)
摘要: 提炼函数(extract method)内联函数(inline method)内联临时变量(inline temp)以查询取代临时变量(replace temp with query)引入解释性变量(introduce explaining variable)分解临时变量(split tempora... 阅读全文
posted @ 2015-12-16 11:34 ~huiChen~ 阅读(111) 评论(0) 推荐(0)
摘要: 1 public abstract class Food 2 { 3 public abstract void Print(); 4 } 5 6 public class MeatFood :Food 7 { 8 public override void Print() 9 {10 Consol... 阅读全文
posted @ 2015-12-16 11:18 ~huiChen~ 阅读(145) 评论(0) 推荐(0)
摘要: 1 public class SingleInstance 2 { 3 private static SingleInstance singleInstance = null; 4 private static readonly object locker = new object(); 5 pr... 阅读全文
posted @ 2015-12-16 11:13 ~huiChen~ 阅读(154) 评论(0) 推荐(0)