PrinterSettings.StringCollection.GetEnumerator 方法

定義

傳回可逐一查看這個集合的列舉程式。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 System::Collections::IEnumerator ^ GetEnumerator();
public System.Collections.IEnumerator GetEnumerator ();
member this.GetEnumerator : unit -> System.Collections.IEnumerator
Public Function GetEnumerator () As IEnumerator

傳回

IEnumeratorPrinterSettings.StringCollection

備註

這個方法會具現化列舉值,這個列舉值會擷取集合目前狀態的快照集。 列舉值沒有集合的獨佔存取權,因此多個列舉值可以同時存取相同的集合。 因此,直接或透過另一個列舉值對集合所做的任何變更,都可能導致 CurrentMoveNext 擲回例外狀況。

同時從相同集合具現化的兩個列舉值可以包含集合的不同快照集。

從列舉值移除物件也會從集合中移除它們。

適用於

另請參閱