EventLogEntryCollection.GetEnumerator Method

Supports a simple iteration over the EventLogEntryCollection object.

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

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

Return Value

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.

NoteNote:

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.

Windows Server 2000 SP4, 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: