最終更新:2020-01-17 (金) 16:46:56 (38d)  

C♯/配列
Top / C♯ / 配列

http://msdn.microsoft.com/ja-jp/library/9b9dty7d(v=vs.80).aspx

https://docs.microsoft.com/ja-jp/dotnet/csharp/programming-guide/arrays/index

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/arrays

1次元配列?

  • int[] array1 = new int[5];
    int[] array2 = new int[] { 1, 3, 5, 7, 9 };
    int[] array3 = { 1, 2, 3, 4, 5, 6 };

多次元配列?

  • int[,] multiDimensionalArray1 = new int[2, 3];
    int[,] multiDimensionalArray2 = { { 1, 2, 3 }, { 4, 5, 6 } };

ジャグ配列

  • int[][] jaggedArray = new int[6][];
    jaggedArray[0] = new int[4] { 1, 2, 3, 4 };

動的配列?

コピー

スライス