public static DataTable ToDataTableTow(IList list) { DataTable result = new DataTable(); ) { PropertyInfo[] propertys = list[].GetType().GetProperties(); foreach (PropertyInfo pi in propertys) { result.Columns.Add(pi.Name, pi.PropertyType); } ; i < l…