Export (0) Print
Expand All

PrinterSettings.PaperSizeCollection.GetEnumerator Method

Returns an enumerator that can iterate through the collection.

Namespace: System.Drawing.Printing
Assembly: System.Drawing (in system.drawing.dll)

public IEnumerator GetEnumerator ()
public IEnumerator GetEnumerator ()
public function GetEnumerator () : IEnumerator
Not applicable.

Return Value

An IEnumerator for the PrinterSettings.PaperSizeCollection.

This method instantiates an enumerator that takes a snapshot of the current state of the collection. The enumerator does not have exclusive access to the collection, so multiple enumerators can have access to the same collection at the same time. Therefore, any changes made to the collection, either directly or through another enumerator, can cause Current or MoveNext to throw an exception.

Two enumerators instantiated from the same collection at the same time can contain different snapshots of the collection.

Removing objects from the enumerator also removes them from the collection.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft