/// <summary>Remove the current entry. Note that remove can /// be called only after a call to next, and only once per such /// call. Remove cannot be called after a call to prev.</summary> public void Remove() { if (current >= 0 && current <= Enclosing_Instance.Count) { Enclosing_Instance.RemoveElement(current); // If we just removed the last entry, then we need // to go back one. if (current > -1) { current -= 1; } } }
/// <summary>Remove the current entry. Note that remove can /// be called only after a call to next, and only once per such /// call. Remove cannot be called after a call to prev.</summary> public void Remove() { if (current == null) { throw new System.SystemException("Removed called in invalid cursor state"); } else { HashedListElement e = current.prev; Enclosing_Instance.RemoveElement(current); current = e; last = current == null ? null : current.prev; } }