title: How to output only a part of values from ListBox?
body: <p>I would like to output only a part of items from <code>listBox1</code> like:<code>response.response.items[counter].first_name</code> to <code>lable_name.Text</code>. How can I do that?</p>
  
  <p>Part of method:</p>
  
  <pre><code>for (int counter = 0; counter &lt; response.response.items.Count; counter++)
  {
      listBox1.Items.Add(response.response.items[counter].first_name + " " + response.response.items[counter].last_name  + Environment.NewLine);
  }
  </code></pre>
  
  <p>The way I output items to lable:</p>
  
  <pre><code>private void listBox1_DoubleClick(object sender, EventArgs e)
  {
      int count = listBox1.Items.Count -1;
  
      for (int counter = count; counter &gt;= 0; counter--)
      {
          if (listBox1.GetSelected(counter))
          { 
              lable_name.Text= listBox1.Items[counter].ToString();
          }
      }
  }
  </code></pre>