摘要: 扩展方法:public static DataTable ConvertToDataTable(thisIEnumerable enumerable){ var dataTable = new DataTable(); foreach (PropertyDescriptor pd in TypeDescriptor.GetProperties(typeof(T))) { dataTable.Columns.Add(pd.Name, pd.PropertyType); } foreach (T item in enumerable) { var Row = dataTable.NewRow(); 阅读全文
posted @ 2011-08-26 18:02 晓风拂月 阅读(3014) 评论(0) 推荐(0) 编辑