C# - Removes selected ListBox items.

By , 8/22/2007
(1 ratings)
Removes the selected items from the given list box.
Translate to VB
/// <summary>
/// Removes the selected items from the given list box.
/// </summary>
/// <param name="lb">The lb.</param>
private void RemoveSelectedItemsFromListBox(ListBox lb)
{
    while (lb.SelectedItems.Count > 0)
        lb.Items.Remove(lb.SelectedItem);
}

Tagged with ListBox, remove, Items.

Comments

 

Log in, to comment!