MessageQueueEnumerator.MoveNext 方法

定义

如果当前有可用的枚举数,使该枚举数前进到枚举的下一个队列。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

返回

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.

注解

MoveNextfalse如果没有与枚举关联的队列,则立即返回。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.

适用于

另请参阅