摘要: public static DataTable ListToDataTable<T>(this IEnumerable<T> list) { var dt = new DataTable(); PropertyInfo[] properyInfos = typeof(T).GetProperties(); foreach (var info in properyInfos) { //dt.Columns.Add(new DataColumn(info.Name, info.PropertyType)); dt.Columns.Add(info.Name); } fore 阅读全文
posted @ 2011-10-14 15:38 万德源 阅读(223) 评论(0) 推荐(0) 编辑