title: Putting the contents of a multidimentional array into a ListView with a for loop
body: <p>I have the following variables and array. I'm trying to push the values into a ListView to display them.</p>
  
  <pre><code>        int oneLIAR = 0;
          int twoLIAR = 0;
          int threeLIAR = 0;
          int fourLIAR = 0;
          int fiveLIAR = 0;
          int sixLIAR = 0;
          int sevenLIAR = 0;
          int eightLIAR = 0;
          int nineLIAR = 0;
          int tenplusLIAR = 0;
          string[,] rowsViewLossCount = new string[10, 2] {
              {"1", oneLIAR.ToString("#,##0")},
              {"2", twoLIAR.ToString("#,##0")},
              {"3", threeLIAR.ToString("#,##0")},
              {"4", fourLIAR.ToString("#,##0")},
              {"5", fiveLIAR.ToString("#,##0")},
              {"6", sixLIAR.ToString("#,##0")},
              {"7", sevenLIAR.ToString("#,##0")},
              {"8", eightLIAR.ToString("#,##0")},
              {"9", nineLIAR.ToString("#,##0")},
              {"10+", tenplusLIAR.ToString("#,##0")}
          };
  </code></pre>
  
  <p>When I try the following loop, I get an error:</p>
  
  <pre><code>        for (int i = 0; i &lt; (rowsViewLossCount.Length-1); i++)
          {
              listViewLossCount.Items.Add(rowsViewLossCount[i, 0]).SubItems.Add(rowsViewLossCount[i, 1]);
          }
  </code></pre>
  
  <p>I get the error "IndexOutOfRangeException was unhandled", "Index was outside the bounds of the array." At the time of the error, i = 10, which means it is out of bounds because it should only ever get to 9. But, I tried replacing in my for loop as "i &lt; 5" to no avail. Any ideas?</p>