A Jagged array is an array whose elements are also an array.the Elements of Jagged array can be of different sizes.It is Called as Array of Arrays.It is Called jagged because of its row in different SIze.
Jagged array declaration in C#:
Code:
int [] [] myJaggedArray = new int [3][];
Declaration of inner arrays:
myJaggedArray[0] = new int[5] ; // First inner array will be of length 5.
myJaggedArray[1] = new int[4] ; // Second inner array will be of length 4.
myJaggedArray[2] = new int[3] ; // Third inner array will be of length 3.
Now to access third element of second row we write:
int value = myJaggedArray[1][2];
Note: Jagged arrays are not rectangular arrays Like Multi-Diemnsional Arrays.