MessageQueueEnumerator.MoveNext MessageQueueEnumerator.MoveNext MessageQueueEnumerator.MoveNext MessageQueueEnumerator.MoveNext Method

定義

如果目前有可用的列舉值,讓列舉值前進至列舉型別的下一個佇列。Advances the enumerator to the next queue of the enumeration, if one is currently available.

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 queue; false if the enumerator has reached the end of the enumeration.

實作

例外狀況

呼叫程式碼沒有瀏覽權限。The calling code does not have browse permissions.

備註

MoveNext 傳回false立即有相關聯的列舉型別沒有任何佇列。MoveNext returns false immediately if there are no queues associated with the enumeration.

MoveNext 會傳回true直到它到達集合的結尾。MoveNext will return true until it has reached the end of the collection. 然後它會傳回false針對每個後續的呼叫。It will then return false for each successive call. 儘管如此,只要MoveNext傳回false,存取Current屬性將會擲回例外狀況。However once MoveNext has returned false, accessing the Current property will throw an exception.

建立後,列舉值會在概念上位於之前,先MessageQueue列舉型別,以及第一次呼叫MoveNext帶來到檢視的列舉型別的第一個佇列。Upon creation, an enumerator is conceptually positioned before the first MessageQueue of the enumeration, and the first call to MoveNext brings the first queue of the enumeration into view.

適用於

另請參閱