摘要: //修改前namespace CleanCSharp.Errors.Dirty { public class SomeClass { public int DoSomeProcess(int? id) { if (id == null) { return -1; // ... 阅读全文
posted @ 2017-04-10 13:42 小小高 阅读(314) 评论(0) 推荐(0)
摘要: //修改前 public class Customer { public string FirstName { get; set; } public string SecondName { get; set; } public bool IsPriorityCustomer { get; set; } public decimal AnnualIncome { g... 阅读全文
posted @ 2017-04-10 13:24 小小高 阅读(263) 评论(0) 推荐(0)
摘要: //一个returnnamespace CleanCSharp.Methods.Dirty { class MethodExitPoints { public string GenerateAgeAppropriateGreeting( int customerAgeInYears) { string gre... 阅读全文
posted @ 2017-04-10 13:08 小小高 阅读(670) 评论(0) 推荐(0)
摘要: namespace CleanCSharp.Methods.Dirty { class BooleanSwitchingArgumentsExample { public void CallingCode() { if (DateTime.Now.Hour < 12) { OutputGreetin 阅读全文
posted @ 2017-04-10 13:03 小小高 阅读(210) 评论(0) 推荐(0)