ArraySegment<T>.Enumerator.MoveNext 方法

定義

將列舉值前移至 ArraySegment<T> 的下一個項目。Advances the enumerator to the next element of the ArraySegment<T>.

public:
 virtual bool MoveNext();
public bool MoveNext ();
abstract member MoveNext : unit -> bool
override this.MoveNext : unit -> bool
Public Function MoveNext () As Boolean

傳回

如果列舉程式成功向前移至下一個元素,則為 true;如果列舉程式已超過陣列區段的結尾,則為 falsetrue if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the array segment.

實作

備註

建立列舉值之後,它會放在陣列區段中的第一個專案之前,而第一次呼叫 MoveNext 會將列舉值前移至陣列區段中的第一個專案。After an enumerator is created, it is positioned before the first element in the array segment, and the first call to MoveNext advances the enumerator to the first item in the array segment.

如果 MoveNext 傳遞陣列區段的結尾,MoveNext 會傳回 falseIf MoveNext passes the end of the array segment, MoveNext returns false. 當列舉值處於此狀態時,MoveNext 的後續呼叫也會傳回 falseWhen the enumerator is at this state, subsequent calls to MoveNext also return false.

適用於