title: How to get the first value from the listbox
body: <p>I have a listbox where the user has generated a list of random numbers into it, and im trying to output the first value from the listbox to a label text. However, just seems to be outputting a random number instead.</p>
  
  <pre><code>while (lstHoldValue.Items.Count &lt; MAX_ITEMS)
  {
      int value = rnd.Next(1 + 100);//ranges from 0 - 100
      if (!lstHoldValue.Items.Contains(value))
          lstHoldValue.Items.Add(value);
  }
  int d = (Convert.ToInt32(lstHoldValue.Items[0]));
  label11.Text = d.ToString(); 
  </code></pre>