MessageQueueEnumerator.Current Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current MessageQueue of the enumeration.
public:
property System::Messaging::MessageQueue ^ Current { System::Messaging::MessageQueue ^ get(); };
public System.Messaging.MessageQueue Current { get; }
member this.Current : System.Messaging.MessageQueue
Public ReadOnly Property Current As MessageQueue
Property Value
The queue at which the cursor is currently positioned.
Exceptions
You called Current before the first call to MoveNext(). The cursor is located before the first queue in the enumeration.
-or-
You called Current after a call to MoveNext() had returned false (indicating the cursor is located after the last queue in the enumeration).
Remarks
When the enumerator is created, it does not point to anything, so Current is not valid and will throw an exception if it is accessed. You must call MoveNext to position the cursor at the first queue in the enumeration.
Multiple calls to Current with no intervening calls to MoveNext will return the same MessageQueue object.