摘要:
有点时候在测试的时候希望打印输出返回对象的各字段的值,如果每个都人为的增加ToString方法的话会很繁琐,采用下面的代码可以很方便的列出对象的各字段值:using System;using System.Linq;using System.Reflection;namespace LucienBao.Common{ public static class ToStringHelper { public static string ToString(object obj) { Type t = obj.GetType(); ... 阅读全文
posted @ 2013-05-03 17:38
Lucien.Bao
阅读(163)
评论(0)
推荐(0)


浙公网安备 33010602011771号