Share via


SetIterator.Next Method

Definition

Moves the iterator to the next element.

public:
 virtual void Next();
public virtual void Next ();
abstract member Next : unit -> unit
override this.Next : unit -> unit
Public Overridable Sub Next ()

Remarks

Use SetIterator.more to determine whether the iterator points to a valid element.

The following example uses the SetIterator.next method to move the iterator to the next element in the set, before testing whether there is another element, and if there is another element, adding the value to a container.

static public void saveSequence(classId _classId, Set _sequence) 
{ 
    SysCheckListItemTable sysCheckListItemTable; 
    SetIterator           si; 
    container             con = connull(); 
    if (_sequence) 
    { 
        si = new SetIterator(_sequence); 
        si.begin(); 
        while (si.more()) 
        { 
             con += si.value(); 
             si.next(); 
        } 
    } 
    //... 
}

Applies to