string [] an = {"a","b","c"};DataTable dt = new DataTable(); dt.Columns.Add("Number"); froeach(string var in an) { DataRow r = dt.NewRow(); r["Number"] = var; dt.Rows.Add(r); }DataSet ds = new DataSet(); ds.Tables.add(dt);
时间: 2024-10-27 11:56:00
string [] an = {"a","b","c"};DataTable dt = new DataTable(); dt.Columns.Add("Number"); froeach(string var in an) { DataRow r = dt.NewRow(); r["Number"] = var; dt.Rows.Add(r); }DataSet ds = new DataSet(); ds.Tables.add(dt);