List转DataTable
摘要:
public static DataTable ListToDT(List ls) { DataTable dt = new DataTable(); Type tp = typeof(T); PropertyInfo[] pinfo = tp.GetProperties(); foreach (PropertyInfo pi in pinfo) { dt.Columns.Add(pi.Name); } if (ls != null) { for (int i = 0; i < ls.Count; i++) { IList TempList = new ArrayList(); fore 阅读全文
posted @ 2013-06-27 11:48 习惯简单 阅读(212) 评论(0) 推荐(0)
浙公网安备 33010602011771号