title: Use List to populate labels C#
body: <p>I'm creating a device application in VS 2005.</p>
  
  <p>I created a List called "info" and want to populate labels on my form with the values from the List. This is my code:</p>
  
  <pre><code>public List&lt;String&gt; info = new List&lt;String&gt;();
  int i = 0;
  
  
  private void populateinfo()
      {
          conn.Open();
          string query;
          query = "select distinct dp.current_location_code,dci.dest_location_code,dps.order_no,dps.company_id_no,dps.no_of_full_cartons,dps.dc_grv_id_no,s.sku_code from dc_pallet_stock dps, dc_pallet dp,sku s , purch_order_carton_sku pocs , dc_crane_instruc dci where dp.pallet_id_no = dps.pallet_id_no and dps.order_no = pocs.order_no and dps.company_id_no = pocs.company_id_no and dps.carton_code = pocs.carton_code and s.sku_id_no = pocs.sku_id_no and s.company_id_no = dps.company_id_no and dp.pallet_id_no = '" + palletId + "' and dci.pallet_id_no(+) = dps.pallet_id_no";
          OracleCommand cmd = new OracleCommand(query, conn);
          OracleDataReader dr = cmd.ExecuteReader();
          while (dr.Read())
          {
              this.info.Add(dr["order_no"].ToString());
          }
          dr.Close();
          conn.Close();
      }
  
  private void frmInfo_Load(object sender, EventArgs e)
      {
          populateinfo();
          lbl3.Text = this.info[++i];
      {
  </code></pre>
  
  <p>Im getting error at <code>lbl3.Text = this.info[++i];</code> </p>
  
  <blockquote>
    <p>Specified argument was out of the range of valid values. Parameter name: index.</p>
  </blockquote>
  
  <p>This is how I'm testing it at the moment, but at the end I want all the columns in my query to be shown in separate labels, how would I do this. Or is there a better way of doing it? Gridview is no option.</p>
  
  <p>Thanks in advance.</p>