MapIterator.next Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Moves the iterator to the next (key, value) pair.
public:
virtual void next();
public virtual void next ();
abstract member next : unit -> unit
override this.next : unit -> unit
Public Overridable Sub next ()
Remarks
You can use the MapIterator.more method to determine whether there are any more elements in the map.
The following example uses the next method to iterate through a map and returns a list of all the elements in the map.
static str writeMap (Map m)
{
MapIterator it = new MapIterator(m);
str result;
while (it.more())
{
result += it.key() + '\n' + it.value() + '\n';
it.next();
}
return result;
}