EventLogEntry.TimeGenerated Property

 

Gets the local time at which this event was generated.

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

public DateTime TimeGenerated { get; }

Property Value

Type: System.DateTime

The local time at which this event was generated.

This member holds the time that an event was generated. This might not be the same as the time when the event information was written to the event log. For the latter, read the TimeWritten property.

There is usually a lag between the time that an event is generated and the time it is logged. It is more important to know when the event was generated, unless you want to see if there is a significant lag in logging. That can happen if your log files are on a different server and you are experiencing a bottleneck.

.NET Framework
Available since 1.1
Return to top
Show: