我已经添加了 70 多个条目,然后我尝试删除这些条目,但它会花费太多时间,即更多 5 分钟,如何快速删除?我的代码如下:
protected virtual void OnDeleteButtonClick()
{ if (RecipientsListBox != null)
{
DKSelectedIndexCollection list = RecipientsListBox.SelectedIndexes;
if ((list != null) &&
(mRecipientsBindingHelper != null) &&
(mRecipientsBindingHelper.RecipientList != null))
{
// Remove the items from the binding list (do it in reverse to preserve the index)
for (int i = list.Count - 1; i >= 0; i--)
{
{
RecipientsBindingHelper.RecipientList.RemoveAt(list[i]);
}
EnableRecipientListPanelControls();
}
}
}