EventLogEntryCollection.GetEnumerator Method ()


Supports a simple iteration over the EventLogEntryCollection object.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

public IEnumerator GetEnumerator()

Return Value

Type: System.Collections.IEnumerator

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

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


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

.NET Framework
Available since 1.1
Return to top