ArrayList 转换为DataTable
int[] arr = new int[] { 13, 20 }; ArrayList list = new ArrayList(arr); var dt = new DataTable(); DataColumn dc = new DataColumn("no"); dt.Columns.Add(dc); DataRow row; for (int i = 0; i < list.Count; i++) { row = dt.NewRow(); row["no"] = list[i]; dt.Rows.Add(row); }