One-dimensional array (single-dimensional)
Multidimensional Arrays (Multidimensional)
Jagged Array (jagged arrays): A jagged array is an array of elements. The dimensions and sizes of jagged array elements can vary. Jagged arrays are sometimes referred to as "arrays of arrays." The following example shows how to declare, initialize, and access a jagged array.
The following declares a one-dimensional array of three elements, each of which is a one-dimensional array of integers:
C#
int[][] Jaggedarray = new int[3][];
You must initialize the Jaggedarray element before you can use it. You can initialize the element as shown in the following example:
C#
Jaggedarray[0] = new Int[5];jaggedarray[1] = new Int[4];jaggedarray[2] = new INT[2];
Each element is an array of one-dimensional integers. The first element is an array of 5 integers, the second one is an array of 4 integers, and the third is an array of 2 integers.
You can also use initializers to populate array elements with values, in which case the array size is not required. For example:
C#
Jaggedarray[0] = new int[] {1, 3, 5, 7, 9};jaggedarray[1] = new int[] {0, 2, 4, 6};jaggedarray[2] = new int[] {11, 22 };
What types of arrays are in C #