摘要: 最近发现以前写的下面两个方法都有错误,default(string) 是null ,null is string 返回falsestatic class Extend { const string def = "dd"; public static T GetValue<T>(this DataRow dr, string name) { try { if (dr[name] == DBNull.Value) { object o = def; return (T)o; } else { return (T)dr[name]; } } catch (Argume 阅读全文
posted @ 2010-11-25 20:36 再快一点 阅读(351) 评论(1) 推荐(0) 编辑