2009-08-27 49 views

回答

1

选项应该工作。如果你坚持处理数组......这是一些伪代码。

var sample = {{0, 1}, {2, 3}, {4, 5}, {6, 7}, {8, 9}}; 
var table = new DataTable("SampleTable"); 

// iteration logic/loops for the array 
{ 
    var newRow = table.NewRow(); 
    newRow["Col1"] = sample[i,j0]; // like sample [0,0] 
    newRow["Col2"] = sample[i,j1]; // like sample [0,1] 
    table.Add(newRow); 
}