Jagged Arrays

This lesson will tell you about the jagged arrays in C# and how they differ from the multidimensional arrays.

Jagged arrays are arrays that instead of primitive types, contain arrays (or other collections).

It’s like an array of arrays - each array element contains another array

They are similar to multidimensional arrays, but have a slight difference - as multidimensional arrays are limited to a fixed number of rows and columns, with jagged arrays, every row can have a different number of columns.

Declaring a Jagged Array

For example, declaring a jagged array with 8 rows:

Get hands-on with 1200+ tech skills courses.