When trying to run this method I get an error:
List that this enumerator is bound to has been modified. An enumerator can only be used if the list does not change.
foreach (var item in lstPhotos.SelectedItems)
{
lstPhotos.Items.Remove(item);
}
How can I remove the selected items?