title: Combine items from two listboxes into a third listbox
body: <p>I am trying to combine the contents of two listboxes such that if ListBox 1 has A,B,C in it and ListBox 2 has 1,2,3 in it, the output in ListBox 3 would be: A1,A2,A3,B1,B2,B3,C1,C2,C3. My code below almost does that, but it writes over the A and B iterations and only shows the C iteration. What am I missing here?</p>
  
  <p>string A;
  string B;</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      for (int i = 0; i &lt; listBox1.Items.Count; i++)
      {
          A =  listBox1.Items[i].ToString();
      }
      for (int j = 0; j &lt; listBox2.Items.Count; j++)
      {
          B = listBox2.Items[j].ToString();
          listBox3.Items.Add(A + ": " + B);
      }
  }
  </code></pre>