无法更改DataRow值
我想更改Datarow
值。 我想改变DT2[0].ItemArray[3]
我尝试了这段代码,但它没有用。
private void Func(DataRow[] DtRowTemp) { DataRow[] DT2 ; DT2 = DtRowTemp; // It work and DTRowTemp value has set to DT2 // above code don't work DT2[0].ItemArray[3] = 3; // Last Value Was 2 and I want to change this value to 3 }
使用ItemArray属性可以获取或设置ENTIRE数组,而不是单个值。
用它来设置第四项:
DT2[0][3] = 3;