MessageEnumerator::Current Property
.NET Framework (current version)
Gets the current Message that this enumerator points to.
Assembly: System.Messaging (in System.Messaging.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | |
| MessageQueueException | The message the enumerator is currently pointing to no longer exists. It might have been deleted. |
When the enumerator is created, it points to the head of the queue, at a location before the first message. In this case, Current is not valid and will throw an exception if it is accessed. You must call MoveNext to position the cursor at the first message in the queue.
.NET Framework
Available since 1.1
Available since 1.1
Show: