DataTable
1.在原有的DataTable上添加一行
DataTable dt = (DataTable)cboSelectTemplate.DataSource;
DataRow dr = dt.NewRow();
dr["paraCName"] = paraCName;
dr["remark"] = JsonConvert.SerializeObject(info);
dt.Rows.Add(dr);
2.DataTable转为数组
string[] arrRate = dtRate.AsEnumerable().Select(d => d.Field<string>(
"arry"
)).ToArray();
3..DataTable转为集合
List<
string
> litRate = dtRate.AsEnumerable().Select(d => d.Field<
string
>(
"arry"
)).ToList();