MessageQueueEnumerator.Current 屬性
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得列舉型別的目前 MessageQueue。
public:
property System::Messaging::MessageQueue ^ Current { System::Messaging::MessageQueue ^ get(); };
C#
public System.Messaging.MessageQueue Current { get; }
member this.Current : System.Messaging.MessageQueue
Public ReadOnly Property Current As MessageQueue
資料指標目前所在的佇列。
在第一次呼叫 Current 之前,請先呼叫 MoveNext()。 資料指標位於列舉型別中第一個佇列的前面。
-或-
您在呼叫 Current 之後呼叫 MoveNext(),會傳回 False (表示游標位於列舉型別最後的佇列之後)。
建立列舉值時,它不會指向任何專案,因此 Current 無效,而且會在存取時擲回例外狀況。 您必須呼叫 MoveNext ,將游標放在列舉中的第一個佇列。
對的多個呼叫 Current ,不會對 進行交錯呼叫 MoveNext ,將會傳回相同的 MessageQueue 物件。
產品 | 版本 |
---|---|
.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 |