title: Dynamic Listview with multiple items
body: <p>So, i have been working in a school project and i need to create and add things to a listview dynamically the 1st adds without any problem, but when it's about to add the 2nd one it crashes.</p>
  
  <p>here is the code:</p>
  
  <pre><code>        lvwCarros.Columns.Clear();
          ListViewItem lvi = new ListViewItem();
          int idx, idx2;
          lvwCarros.Columns.Add("Carro", 80, HorizontalAlignment.Center);
          lvwCarros.Columns.Add("Ano", 60, HorizontalAlignment.Center);
          lvwCarros.Columns.Add("Stand", 60, HorizontalAlignment.Center);
          lvwCarros.Columns.Add("Localização do Stand", 120, HorizontalAlignment.Center);
          for (idx = 0; idx &lt; Program.Carros.Count  ; idx++)
          {
              lvi.Text = Program.Carros[idx].Marca + " " + Program.Carros[idx].Modelo;
  
              for (idx2 = 0; idx2 &lt; Program.Matriculas.Count  ; idx2++)
              {
                  if (Program.Carros[idx].Matricula == Program.Matriculas[idx2].ID_Matricula)
                  {
                      lvi.SubItems.Add(Program.Matriculas[idx2].Ano_Emissão.ToString());
                      for (int idx3 = 0; idx3 &lt; Program.Stands.Count; idx3++)
                      {
                          if (Program.Carros[idx].Proprietario == Program.Stands[idx3].ID_Stand)
                          {
                              lvi.SubItems.Add(Program.Stands[idx3].Nome_Stand);
                              lvi.SubItems.Add(Program.Stands[idx3].Local_Stand);
                          }
                          lvwCarros.Items.Add(lvi);
                      }
                  } 
              }
          }
  
          lvwCarros.Visible = true;
          lvwCarros.Enabled = true;
  </code></pre>
  
  <p>Thank you very much in advance :)</p>