使用CSharp,我想访问数据表的每个单元格。我怎样才能做到这一点?我想访问数据表的每个单元格。怎么样?
for (int i = 0; i <= 5; i++)
{
if (myQuantity[i]!=null && myQuantity[i].Length>0)
{
row = dt.NewRow();
row["Name"] = myName[i];
row["Quantity"] = myQuantity[i];
row["Price"] = myPrice[i];
c = Convert.ToInt32(myQuantity[i]);
int price = Convert.ToInt32(myPrice[i]) * c;
row["Amount"] = price;
dt.Rows.Add(row);
}
}
你能更具体地了解你遇到的问题吗? – 2012-08-02 10:04:29
可以请详细解释一下吗? – 2012-08-02 10:04:55