# Foreach loop through a 2D array of objects?

**URL:** <https://forum.kirupa.com/t/foreach-loop-through-a-2d-array-of-objects/313538>\
**Category:** Uncategorized\
**Created:** [September 2, 2010, 8:01am UTC](https://forum.kirupa.com/t/foreach-loop-through-a-2d-array-of-objects/313538 "2010-09-02T08:01:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vidar](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@Vidar](https://forum.kirupa.com/u/Vidar)\
**Post date:** [September 2, 2010, 8:01am UTC](https://forum.kirupa.com/t/foreach-loop-through-a-2d-array-of-objects/313538/1 "2010-09-02T08:01:16Z")

</div>

I am used to C# and XNA, where its very simple to go through all objects in a list or array.

I am trying to make a tile map, and have a 2D array of TileObjects.

how do i make a loop that goes through all object?

-Vidar
