MessageQueueEnumerator.MoveNext Method

Definition

Advances the enumerator to the next queue of the enumeration, if one is currently available.

C#
public bool MoveNext();

Returns

true if the enumerator was successfully advanced to the next queue; false if the enumerator has reached the end of the enumeration.

Implements

Exceptions

The calling code does not have browse permissions.

Remarks

MoveNext returns false immediately if there are no queues associated with the enumeration.

MoveNext will return true until it has reached the end of the collection. It will then return false for each successive call. However once MoveNext has returned false, accessing the Current property will throw an exception.

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.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also