title: C# Multidimensional Array Of Rectangles?
body: <p>I've hit a wall with this array of rectangles. I was fine with simply a one dimensional array but with one with 4 columns I've just started banging my head on my wall...</p>
  
  <p>I've defined the array as:</p>
  
  <pre><code>private Rectangle[,] brick = new Rectangle[2, 8];
  </code></pre>
  
  <p>Then these are used in conjunction to that:</p>
  
  <pre><code>int[,] brickLocation = { {0, 0}, {0,21}, {0,42}, {0, 63}, {0, 84}, {0, 105}, {0, 126},
                               {61, 0}, {61,21}, {61,42}, {61, 63}, {61, 84}, {61, 105}, {61, 126} };
  bool[] brickLive = { true, true, true, true, true, true, true,
                         true, true, true, true, true, true, true };
  </code></pre>
  
  <p>And then trying to draw the rectangles through the multi array loop:</p>
  
  <pre><code>for (int i = 0; i &lt; brickLive.Length; i++)
  {
      for (int j = 0; j &lt; brickLive.Length; i++)
      {
          if (brickLive[i] == true)
          {
              brick[i, j] = new Rectangle(brickLocation[i, 0], brickLocation[i, 1], brkLength, brkHeight);
                      brickPaper.DrawRectangle(brickPen, brick[i, j]);
          }
          else
          {
              continue; //move onto next brick
          }
      }
  }
  </code></pre>
  
  <p>It's stopped working and I can't think what I can do.... Can anyone help?</p>