title: C# combox index to textbox list
body: <p>So I am trying to make a name lister. What I have is when user enters name into combobox and presses button "Add Name" the name is added to its list. Then if user presses button "list names" all names in the combobox list are displayed into the text box. </p>
  
  <p>I was able to code it to do the first part but can't figure out or find a code that takes the names from combobox and displays them in the text box. Please help. Because what I want is when the "List Names" button is pressed, it adds a list of the names from the combobox into the text box using a loop.</p>
  
  <p>The photo is what it looks like just before pressing the "list names" button. And then here is my code so far. I'm writing this code in C#.</p>
  
  <pre class="lang-cs prettyprint-override"><code>//My code for btnExit.
  private void btnExit_Click(object sender, EventArgs e)
  {
      Close();
  }
  
  //My code for btnAdd.
  private void btnAdd_Click(object sender, EventArgs e)
  {
      cboName.Items.Add(cboName.Text);
      cboName.Text = "";
      cboName.Focus();
  }
  
  //My code for btnList.
  private void btnList_Click(object sender, EventArgs e)
  {
  }    
  </code></pre>
  
  <p>My photo</p>
  
  <p><a href="https://i.stack.imgur.com/kBcsp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kBcsp.png" alt="my list image"></a></p>