分类目录

链接

2017年 9月
 123
45678910
11121314151617
18192021222324
252627282930  

近期文章

热门标签

新人福利,免费薅羊毛

if else过多应该使用策略模式

      public class Test     {           private int type;         Dictionary<int, Action> actionList = new Dictionary<int, Action>();           public Test(int _type)         {             type = _type;             actionList.Add(1, () => { /*todo 1 */ });             actionList.Add(2, () => { /*todo 2 */});             actionList.Add(3, () => { /*todo 3 */});             actionList.Add(4, () => { /*todo 4 */});           }         public void Do(...

.NET 暂无评论 阅读(763)