System.Diagnostics.EventLogEntryCollection.CopyTo Method

Copies the elements of the System.Diagnostics.EventLogEntryCollection to an array of System.Diagnostics.EventLogEntry instances, starting at a particular array index.

Syntax

public void CopyTo (EventLogEntry[] eventLogEntries, int index)

Parameters

eventLogEntries
Documentation for this section has not yet been entered.
index
The zero-based index in the array at which copying begins.

Remarks

Because new entries are appended to the existing list, stepping through the collection enables you to access the entries that were created after you originally created the System.Diagnostics.EventLogEntryCollection. An array of System.Diagnostics.EventLogEntry instances is fixed at the time it is instantiated. Therefore, you cannot read new entries by using the array that is returned by the EventLogEntryCollection.CopyTo(EventLogEntry[], int) method.

Requirements

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