System.Diagnostics.EventLogEntryCollection.GetEnumerator Method

Supports a simple iteration over the System.Diagnostics.EventLogEntryCollection object.

Syntax

public IEnumerator GetEnumerator ()

Returns

An object that can be used to iterate over the collection.

Remarks

The object that is returned by the EventLogEntryCollection.GetEnumerator method is a wrapper for the System.Diagnostics.EventLogEntryCollection class that implements the IEnumerator enumerator.

Note:

If the collection is changed during the iteration, the iteration is terminated. To avoid this possibility, see the EventLogEntryCollection.Item(int) property for an alternative technique for iterating through a collection.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0