PrinterSettings.PaperSourceCollection.GetEnumerator Método
Definição
Retorna um enumerador que pode iterar pela coleção.Returns an enumerator that can iterate through the collection.
public:
System::Collections::IEnumerator ^ GetEnumerator();
public System.Collections.IEnumerator GetEnumerator ();
member this.GetEnumerator : unit -> System.Collections.IEnumerator
Public Function GetEnumerator () As IEnumerator
Retornos
Um IEnumerator para o PrinterSettings.PaperSourceCollection.An IEnumerator for the PrinterSettings.PaperSourceCollection.
Comentários
Esse método instancia um enumerador que usa um instantâneo do estado atual da coleção.This method instantiates an enumerator that takes a snapshot of the current state of the collection. O enumerador não tem acesso exclusivo à coleção, portanto, vários enumeradores podem ter acesso à mesma coleção ao mesmo tempo.The enumerator does not have exclusive access to the collection, so multiple enumerators can have access to the same collection at the same time. Portanto, todas as alterações feitas na coleção, diretamente ou por meio de outro enumerador, podem causar Current ou MoveNext gerar uma exceção.Therefore, any changes made to the collection, either directly or through another enumerator, can cause Current or MoveNext to throw an exception.
Dois enumeradores instanciados da mesma coleção ao mesmo tempo podem conter instantâneos diferentes da coleção.Two enumerators instantiated from the same collection at the same time can contain different snapshots of the collection.
A remoção de objetos do enumerador também os remove da coleção.Removing objects from the enumerator also removes them from the collection.