public bool MoveNext() { if (_list.ChangeCount != _changeCount) { //the number mismatch, there is new change(s) happened since last MoveNext() is called. throw new InvalidOperationException(SR.Xdom_Enum_ElementList); } else { _curElem = _list.GetNextNode(_curElem); } return(_curElem != null); }
public bool MoveNext() { if (list.ChangeCount != this.changeCount) { //the number mismatch, there is new change(s) happened since last MoveNext() is called. throw new InvalidOperationException(Res.GetString(Res.Xdom_Enum_ElementList)); } else { curElem = list.GetNextNode(curElem); } return(curElem != null); }