ReadOnlySpan<T>.Enumerator.MoveNext 方法
定义
将枚举器推进到 ReadOnlySpan<T> 的下一项。Advances the enumerator to the next item of the ReadOnlySpan<T>.
public:
bool MoveNext();
public bool MoveNext ();
member this.MoveNext : unit -> bool
Public Function MoveNext () As Boolean
返回
如果枚举器成功推进到下一项,则为 true;如果已通过范围的末尾,则为 false。true if the enumerator successfully advanced to the next item; false if the end of the span has been passed.
注解
创建枚举器后,该枚举数将定位到范围中的第一个元素之前,第一次调用会将 MoveNext 枚举数前移到范围中的第一项。After an enumerator is created, it is positioned before the first element in the span, and the first call to MoveNext advances the enumerator to the first item in the span.
如果 MoveNext 越过范围的末尾,则 MoveNext 返回 false 。If MoveNext passes the end of the span, MoveNext returns false. 在此状态下,对的后续调用也将 MoveNext 返回 false 。When the enumerator is at this state, subsequent calls to MoveNext also return false.