Dealing with Arrays in C# | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Dealing with Arrays in C#

Hi guys what's the advantage of using 2D Jaggered arrays over 2D rectangular arrays?.

10th Apr 2017, 8:43 AM
Lehlohonolo
Lehlohonolo - avatar
1 Answer
+ 2
In a jaggered array the subarrays can all be of different size. In a multidimensional array this is not possible. There aren't any subarrays. Besides of that I can't think about any other advantages. But I would always use multidimensional arrays over jagged arrays, if I didnt need one due to the above statement.
10th Apr 2017, 9:14 AM
lulugo
lulugo - avatar