-2

How would I go about looping through an array in an array. Something that looks a bit like this:

int[,]

This is the thing I want to achieve:

int[,] obj

for(int i = 0; i < obj.Length; i++) {}

Thanks!

Diseased Finger
  • 107
  • 2
  • 9
  • 1
    Does this answer your question? [C# Multidimenional Array parsing](https://stackoverflow.com/questions/9312603/) and [How do you loop through a multidimensional array?](https://stackoverflow.com/questions/9301109/) and [Iterate Multi-Dimensional Array with Nested Foreach Statement](https://stackoverflow.com/questions/2893297/) and [How to use foreach with a two dimensional array of objects?](https://stackoverflow.com/questions/34646580/) and [Iterating through a 2D array with foreach](https://stackoverflow.com/questions/34559289/) –  Aug 07 '21 at 03:00

1 Answers1

0

Just found the answer! All you need is a foreach block. All you have to do is: foreach (var item in itemArray) { }

Diseased Finger
  • 107
  • 2
  • 9