You can use SelectMany
var flat = my2dArray.SelectMany(a => a).ToArray();
This will work with a gear array, as in your example, but not with a 2D array, for example
var my2dArray = new [,] { { 1, 2, 3 }, { 1, 2, 3 } };
But in this case, you can iterate over values ββlike this
foreach(var item in my2dArray) Console.WriteLine(item);
juharr source share