标签: c# datatable
我必须将字符串变量分配给datatable。 dtHistoryList.Rows[1].ItemArray[3] = txtNaiyo.Text; 它不起作用。请帮助我。
dtHistoryList.Rows[1].ItemArray[3] = txtNaiyo.Text;
答案 0 :(得分:1)
使用索引器
dtHistoryList.Rows[1][3] = txtNaiyo.Text
或
dtHistoryList.Rows[1]["rowName"] = txtNaiyo.Text