<<Multi-dimensional Array 다차원 배열>>
하나의 대괄호([]) 안에 쉼표로 차원을 구분하는 배열이다.
- 대괄호 사용법 예시 1) [ , , , ] ← 4차원
- 대괄호 사용법 예시 2) [ , ] ← 2차원
- 대괄호 사용법 예시 3) [ ] ← 1차원
JAVA의 경우 언어차원에서는 제한이 없으나, JAVA VM에서는 차원을 255까지 지원한다.
이에 비해 C#에서 배열은 32차원까지 가질수 있다.
차원을 구하는 방법은 (배열변수명).Rank 속성을 이용하면된다. (Dimension인줄 알고 열심히 찾았는데 잘 안나왔다는....)
<<Jagged Array(가변 배열>>
- 대괄호([])가 여러 개 중첩한 배열이다.
- 대괄호 사용법 예시 1) [ ][ ]
- 대괄호 사용법 예시 2) [ , ][ ][ , ]
- 대괄호 사용법 예시 3) [ , , ][ , ][ , , ]
- Jagged Array에는 중요한 특징들이 있다.
- 각 대괄호마다 차원을 가질 수 있다.
- 맨 왼쪽의 대괄호 내부의 길이 값은 반드시 정의 되어야한다. ← 기준을 잡는 것이 혼동될 수 있다.
- .
길이가 0인 1차원 배열 |
|
|
길이가 1인 1차원 배열 |
|
|
초기 값을 할당하지 않은 1차원 배열 |
|
|
2차원 배열 |
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | private void ArrayDimensionTest_Jagged2() { Console.WriteLine("<< Jagged array2 >>"); //The number of rows must be fixed. int[][,] arr1 = //new int[][,] { //Array length is free new int[,] { { 1, 10 }, { 101, 1001 } } , new int[,] { { 2, 20 }, { 200, 2000 }, { 201, 2001 } } }; int[][,] arr2 = { new int[,] { { 6, 60 ,61, 69}, { 600, 6000 ,6001, 6969} } , new int[,] { { 2, 2 }, { 1, 18 }, { 71, 1 }, { 11, 1 } } , new int[,] { { 7, 70 ,71}, { 700, 7000 ,7001} } }; int[][,] arr3 = { new int[,] { { 2, 2, 9, 9 }, { 1, 1, 9, 9 } } , new int[,] { { 8, 80, 9, 9, 9 }, { 800, 8000, 9, 9, 119 } } , new int[,] { { 2, 2, 91, 9 }, { 1, 1, 9, 96 } } , new int[,] { { 2, 2 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } } }; int[][,] arr4 = { new int[,] { { 8, 80 }, { 800, 8000 } } , new int[,] { { 2, 2, 9 }, { 1, 1, 9 } } , new int[,] { { 6, 60 ,61, 69}, { 600, 6000 ,6001, 6969} } , new int[,] { { 2, 2 }, { 1, 18 }, { 71, 1 }, { 11, 1 } } , new int[,] { { 7, 70 ,71}, { 700, 7000 ,7001} } }; int[,,][][,] jaggedMultiArray = { { { arr1, arr2, arr3 }, { arr3, arr4 ,arr2 } } , { { arr3, arr4, arr1 }, { arr2, arr3, arr4 } } , { { arr2, arr3, arr2 }, { arr1, arr2, arr1 } } }; myArrayModule.PrintArrayDimension(jaggedMultiArray); Console.WriteLine(); } | cs |
※ Jagged array의 GetType한 결과를 출력하면 괄호가 거꾸로 출력되는 것 같은데, 원인을 아직 잘 모르겠음 << Jagged array2 >> (0) Total dimension : 3 / All element count : 18 / Type : System.Int32[,][][,,] (0) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) (0) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) (0) Dimension(Rank) (No.3) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 2 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 3 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 4 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 4 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 5 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 3 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 4 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 5 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 2 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 3 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 4 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 5 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 3 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 4 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 10 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 5/0/4) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 3 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 2 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) ----(1) Total dimension : 1 / All element count : 3 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Total dimension : 2 / All element count : 8 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 4/0/3) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 3/0/2) ----(1) Total dimension : 1 / All element count : 2 / Type : System.Int32[,][] ----(1) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 4 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) --------(2) Total dimension : 2 / All element count : 6 / Type : System.Int32[,] --------(2) Dimension(Rank) (No.1) >> (Length/LowerBound/UpperBound : 3/0/2) --------(2) Dimension(Rank) (No.2) >> (Length/LowerBound/UpperBound : 2/0/1) |
<<참조 링크 >>
C# 배열 정리 : https://blockdmask.tistory.com/311
.NET 4.8 Array Class 문서 (영어) : https://docs.microsoft.com/en-us/dotnet/api/system.array?view=netframework-4.8
.NET 4.8 Array.Rank 문서 (한글) : https://docs.microsoft.com/ko-kr/dotnet/api/system.array.rank?view=netframework-4.8
가변 배열 프로그래밍 가이드 : https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/arrays/jagged-arrays
가변 배열 (영문) : http://archive.oreilly.com/oreillyschool/courses/csharp3/jagged_arrays.html
가변 배열 작성 예시 (1) : https://www.geeksforgeeks.org/c-sharp-jagged-arrays/
가변 배열 작성 예시 (2) : https://www.pluralsight.com/guides/multidimensional-arrays-csharp
JAVA 배열 차원 : https://stackoverflow.com/a/4060594/7017299
C#의 배열 차원에 관한 답변 : https://stackoverflow.com/a/22713889/7017299
다차원 배열과 가변 배열 문답 (1) : https://stackoverflow.com/q/4648914/7017299
다차원 배열과 가변 배열 문답 (2) : https://stackoverflow.com/q/12567329/7017299
<< 후기 >>
가변 배열의 첫번째 대괄호를 다차원으로 설정하는 예시 글이 단 하나도 없다...
무슨 문제라도 있는 것인가 아니면 내가 못찾는 것인가...
'Study > .NET (C#, WPF, Unity)' 카테고리의 다른 글
[C#] Helix-toolkit 연구중 (WPF.SharpDX 기준) (0) | 2021.01.27 |
---|---|
[Unity] Windows Magic Leap 초기 설정 (0) | 2020.12.08 |
[C#] 디렉토리 (폴더) 삭제에 관하여 (0) | 2019.08.23 |
[C#] 문법 공부중입니다 (0) | 2018.05.17 |