title: adding items to columns/rows in listview using foreach
body: <p>I am into day 5 of learning c#, and am trying to figure out how to fill/re-fill a ListView control, containing 10 rows and 12 columns, using a foreach loop.  I have coded the functionality I'm after in C.</p>
  
  <pre><code>void listPopulate(int *listValues[], int numberOfColumns, int numberOfRows)
  {
      char table[100][50];
      for (int columnNumber = 0; columnNumber &lt; numberOfColumns; ++columnNumber)
      {
          for (int rowNumber = 0; rowNumber &lt; numberOfRows; ++rowNumber)
          {
              sprintf(&amp;table[columnNumber][rowNumber], "%d", listValues[columnNumber][rowNumber]);
              // ...
          }
      }
  }
  </code></pre>
  
  <p>Here is what I have figured out so far:</p>
  
  <pre><code>public void listView1_Populate()
  {
  
      ListViewItem item1 = new ListViewItem("value1");
      item1.SubItems.Add("value1a");
      item1.SubItems.Add("value1b");
  
      ListViewItem item2 = new ListViewItem("value2");
      item2.SubItems.Add("value2a");
      item2.SubItems.Add("value2b");
  
      ListViewItem item3 = new ListViewItem("value3");
      item3.SubItems.Add("value3a");
      item3.SubItems.Add("value3b");
      ....
  
      listView1.Items.AddRange(new ListViewItem[] { item1, item2, item3 });
  }
  </code></pre>
  
  <p>I'm assuming that I would have to do the creation of the list items in a separate step.  So my question is: there must be a way to do this in C# with a for or foreach loop, no?</p>