Edit

Share via


PrintJobInfoCollection.GetNonGenericEnumerator Method

Definition

Gets an object that implements the non-generic IEnumerator interface.

public:
 virtual System::Collections::IEnumerator ^ GetNonGenericEnumerator() = System::Collections::IEnumerable::GetEnumerator;
public:
 virtual System::Collections::IEnumerator ^ GetNonGenericEnumerator();
public virtual System.Collections.IEnumerator GetNonGenericEnumerator ();
abstract member GetNonGenericEnumerator : unit -> System.Collections.IEnumerator
override this.GetNonGenericEnumerator : unit -> System.Collections.IEnumerator
Public Overridable Function GetNonGenericEnumerator () As IEnumerator

Returns

An object that implements the non-generic IEnumerator interface and that can iterate through the PrintSystemJobInfo objects that the PrintJobInfoCollection contains.

Remarks

We recommend that you use the foreach statement to iterate through all members of the collection. Use your own enumerator object only when you need to customize iteration, such as by skipping every other member.

If you need your own enumerator, we recommend that you use the generic, type-safe function GetEnumerator instead of GetNonGenericEnumerator. The GetNonGenericEnumerator is public only to fulfill the requirements of the IEnumerable interface, which is implemented by this collection.

Applies to