C# IList<T>转为DataTable
摘要:public class WebUtil{/// /// 转换IList为DataTable/// /// 泛型类型 /// 泛型List集合 /// Datatable 对象public static DataTable ConvertToDataTable(IList list) {DataTable table = CreateTable();Type entityType = typeof(T);PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(entityType);foreach (T ..
阅读全文
posted @ 2013-11-12 15:35