public bool Remove(T item) { int index = IndexOf(item); bool result; if (index >= 0) { RemoveAtCommand command = new RemoveAtCommand(theList, index); undoManager.Execute(command); result = true; } else { result = false; } return(result); }
public void RemoveAt(int index) { RemoveAtCommand command = new RemoveAtCommand(theList, index); undoManager.Execute(command); }