摘要: 心法”就是:只要屏幕上有需要思量一下的代码,则一定有办法简化。例子:求三个整数中的最大值 public int Max(int a, int b, int c) { if (a > b) { if (a > c) return a; else return c; } else { if (b > c 阅读全文
posted @ 2017-08-10 11:56 KamChau 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 1.从Html代码抽取MVC HtmlHelper <td class = "noborder nopaddingv"> <div class = "aligncenter"> <a href="/Home/Index"> <img src="../../Resouces/Images/Agile/ 阅读全文
posted @ 2017-08-10 11:54 KamChau 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1.合并相似代码:牢记心法:只要屏幕上有任何两部分代码看上去相似,则一定有合并办法例子:if (!result.Contains("true")) { _repSFC.GrantAuthorityToRole(authority, role, false); } if (result.Contain 阅读全文
posted @ 2017-08-10 11:52 KamChau 阅读(950) 评论(0) 推荐(0) 编辑