title: Multidimensional array IndexOutOfRange
body: <p>I have this code:</p>
  
  <pre><code>int[, ,] data = new int[16, 32, 16];
  
  for (int x = 0; x &lt; data.GetLength(0); x++)
  {
      for (int z = 0; z &lt; data.GetLength(1); z++)
      {
          for (int y = 0; x &lt; data.GetLength(2); y++)
          {
              if (data[x, y, z] != 0)
              {
                  // CODE
              }
          }
      }
  }
  </code></pre>
  
  <p>Error:
  IndexOutOfRangeException: Array index is out of range.
  (wrapper managed-to-managed) object:ElementAddr (object,int,int,int)</p>
  
  <p>When: X=0 Y=32 Z=0</p>