當前位置:成語大全網 - 書法字典 - C# Access表有兩個字段,如何將表中的數據添加到二維數組中?大神們,救救我。

C# Access表有兩個字段,如何將表中的數據添加到二維數組中?大神們,救救我。

數據表中的每壹行數據都是壹個數組。只需將此數組添加到二維數組中。

DataTable 1 = new DataTable();

ah-ah 1 . columns . add(“_ id“,type of(int));

啊-啊1。Columns.Add(“學生姓名”,typeof(字符串));

啊-啊1。Columns.Add(“中文成績”,type of(int));

啊-啊1。列數= Ah-ah 1。行數= Ah-Ah 1 . rows【1】。itemarray

Object【】【】維二=新對象【2】【】;

維度2【0】= A‘A 1。行數【0】。ItemArray

維度2【1】= A‘A 1。行數【1】。itemarray