title: Listbox items to string
body: <p>This should be easy, but I'm failing to do this.
  I have listbox with checkbox option turned on. So I'd like to have selected items in one string.
  Like this:</p>
  
  <pre><code>item1,item4,item9
  </code></pre>
  
  <p>and so on.</p>
  
  <p>Notice that they should be divided by "," and last comma deleted.</p>
  
  <p>Tried something like this, but won't work:</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
  for (int i = 0; i &lt; lb1.Items.Count; i++)
      sb.Append(lb1.Items[i].Selected ? lb1.Items[i].Text + "," : "");
  TextBox1.Text = sb.ToString();
  </code></pre>