リストを作成したいのですが、その各要素は、C言語の構造体の配列と同様に配列です。それはc#で行うことができますか?それができる場合はどうすればよいですか?どうもありがとう!
間違い:
List<int[]> arrayList = new List<int[]>;
新しい句の最後に括弧がありません。
List<int[]> arrayList = new List<int[]>();
開始値がわかっている場合は、次のように初期化することもできます。
List<int[]> arrayList = new List<int[]>
{
new int[] { 1, 2, 3, 4 },
new int[] { val1, val2, val3 },
otherIntArray
};
List<Int[]> arrList = new List<Int[]>();
int[] ArrayOfInts = new int[10];
必要に応じて記入
arrList.Add(ArrayOfInts);