ListEnumerator.Movenext 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.
Determines whether the enumerator denotes a valid list element.
public:
virtual bool Movenext();
public bool Movenext ();
abstract member Movenext : unit -> bool
override this.Movenext : unit -> bool
Public Function Movenext () As Boolean
Returns
true if the current position in the list holds a valid element; otherwise, false.
Implements
Remarks
List enumerators start before the first element in the list. You must call the moveNext method to make it point to the first element in the list.
The following example uses the moveNext method to check whether there is another element in the list and then sets the dimensionTopic variable to the value of the current list element.
public DimensionTopic firstDimensionTopic()
{
DimensionTopic dimensionTopic;
ListEnumerator enumerator;
enumerator = this.getTopicsEnumerator();
if (enumerator.moveNext())
{
dimensionTopic = enumerator.current();
}
return dimensionTopic;
}