分类目录

链接

2024 年 5 月
 12345
6789101112
13141516171819
20212223242526
2728293031  

近期文章

热门标签

新人福利,免费薅羊毛

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 暂无评论 阅读(767)