Hi can someone help me deleting array in multidimensional this code keeps on Array out of Bound
``` int[,] Arr = { { 10,20,30,40}, { 10,20,30,40}, { 10,20,30,40}, { 10,20,30,40} }; int index = 1; for(int x = 0; x <= 3; x++) { for (int i = index; i < Arr.Length - 1; i++) { Arr[i, x] = Arr[i + 1, x]; } } ```
1 Answer
The Length property returns the length of the first dimension. When you want to access the other dimensions, you have to use the GetLength() method. See this SO.
iandxare you getting the exception?