foreach(ListItem item in lstBox.SelectedItems)
{
lstBox.Items.Remove(item);
}

解决方案 »

  1.   

    listBox1.Items.RemoveAt(listBox1.SelectedIndex);
      

  2.   

    foreach(ListItem item in lstBox.SelectedItems)
    {
    lstBox.Items.Remove(item);
    }这种也不行,winform中没有listItem
      

  3.   

    那就直接从你的数组中删除选中的数据项,然后再重新绑定到listBox
      

  4.   

    先循环找到当前选种项的值
    再通过ListBox.Items.Remove()删除int intindex=lstBox.SelectedIndex;
    lstBox.Items.Remove(lstBox.Items[intindex]);
      

  5.   

    再删除前先要做判断if (lstBox.SelectedIndex < lstBox.Items.Count)
    {
       if (lstBox.SelectedIndex < lstBox.Items.Count-1)
           {
             int intindex=lstBox.SelectedIndex;
             lstBox.Items.Remove(lstBox.Items[intindex]);
           }
    }