列の長さが動的な文字列の多次元配列を作成しようとしています。
行と列の数はさまざまですが、次のような出力を持つ変数に格納できないようです。
index[0] = {"string1", "string2", "string" and so on..}
index[1] = {"string1", "string2", "string" and so on..}
これが私のコードです:
int arrayRows = itemCollection.Count;
int arrayColumns = parsedColumns.Count;
String[,] listDataArray = new String[arrayRows, arrayColumns];
for (int i = 0; i != arrayRows; i++)
{
for (int j = 0; j != arrayColumns; j++)
{
listDataArray[i, j] = "" + itemCollection[i][parsedColumns[j]];
}
}
事前に助けてくれてありがとう!:)