我们在写一些Model的时候,经常会重写ToString,为了在控制台中进行打印或者更好的单元测试. 但是,如果Model的字段非常多的时候,如此简单的重复劳动经常会变成一件令人头痛的事情,因为大家 都不想重复劳动,或者这种事情应该交给初级程序员或者毕业生去做. 看如下: public class Customer { public string FirstName { get; set; } public string LastName { get; set; } public int Age…
原文信息 原文地址 作者信息 Sergey Dmitriev JetBrains Sergey Dmitriev is the cofounder and CEO of JetBrains Inc., makers of the IntelliJ IDEA Java IDE .Sergey's personal website can be found at www.sergeydmitriev.com Contact Sergey via email: dmitriev (at) jetbra…