摘要:
protected List<T> DataTableToList<T>(DataTable dataTable) { List<T> list = new List<T>(); Type targetType = typeof(T); PropertyInfo[] allPropertyArray = targetType.GetProperties(); foreach (DataRow rowElement in dataTable.Rows) { T element = Activator.CreateInstance<T>( 阅读全文