title: Casting ListBox.SelectedItems in c#
body: <p>Trying to add multiple selected items from one listBox to another.</p>
  
  <pre><code>rightBox.Items.AddRange(leftBox.SelectedItems)
  </code></pre>
  
  <p>However, this throws an error because <code>AddRange()</code> is looking for <code>ListBox.ObjectCollection</code> but, <code>leftBox.SelectedItems</code> is <code>ListBox.SelectedObjectCollection</code></p>
  
  <p>How can I cast <code>SelectedObjectCollection</code> to an <code>ObjectCollection</code>?</p>
  
  <p>Or is there a better way to be doing this?</p>