IIterator<T>.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.
Advances the iterator to the next item in the collection.
public:
bool MoveNext();
bool MoveNext();
public bool MoveNext();
Public Function MoveNext () As Boolean
Returns
bool
True if the iterator refers to a valid item in the collection; false if the iterator passes the end of the collection.
Remarks
If the iterator is already past the end of the collection, the iterator may throw an exception.
.NET Framework If the iterator is already past the end of the collection, the iterator may throw a
COMException
exception with an HResult of0x8000000B
(E_BOUNDS
).
C++/WinRT If the iterator is already past the end of the collection, the iterator may throw a
hresult_out_of_bounds
exception.
C++/CX If the iterator is already past the end of the collection, the iterator may throw a
OutOfBoundsException
exception.
If the underlying collection has changed, the iterator may throw an exception.
.NET Framework If the underlying collection has changed, the iterator may throw a
COMException
exception with an HResult of0x8000000C
(E_CHANGED_STATE
).
C++/WinRT If the underlying collection has changed, the iterator may throw a
hresult_changed_state
exception.
C++/CX If the underlying collection has changed, the iterator may throw a
ChangedStateException
exception.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för