我创建了一个数据表.它有3列Product_id,Product_name和Product_price
Datatable table= new DataTable("Product");
table.Columns.Add("Product_id", typeof(int));
table.Columns.Add("Product_name", typeof(string));
table.Columns.Add("Product_price", typeof(string));
table.Rows.Add(1, "abc", "100");
table.Rows.Add(2, "xyz", "200");
Run Code Online (Sandbox Code Playgroud)
现在我想通过索引找到并更新该行.
比如说
我想将Product_name列的值更改为具有Product_id列值的"cde" :2.