DataTable dataTable = GetDataTableFromRepeater(); DataTable newTable = dataTable.Clone(); int infoPoint = TxtInfoPoint.Text.ToInt32(); foreach (DataRow row in dataTable.Rows) { switch (row.ItemArray[0].ToString()) { case "ThinkingCurrency": DataRow dr = newTable.NewRow(); dr["aa"] = row["aa"]; dr["bb"] = infoPoint; dr["cc"] = row["cc"]; dr["dd"] = row["dd"]; newTable.Rows.Add(dr); break; default: DataRow drs = newTable.NewRow(); drs.ItemArray = row.ItemArray; newTable.Rows.Add(drs); break; } } dataTable = newTable; 来源:https://www.cnblogs.com/zhangqs008/archive/2010/11/19/2341164.html 标签 大数据 datatable