System.Diagnostics.EventLogEntry.EventID Property

Gets the application-specific event identifier for the current event entry.

Syntax

[System.Diagnostics.MonitoringDescription("An ID number for this event entry.")]
[System.Obsolete("Use InstanceId")]
public int EventID { get; }

Value

Documentation for this section has not yet been entered.

Remarks

This value represents the event identifier for the entry in the event log, with the top two bits masked off. The EventLogEntry.InstanceId property for an event log entry represents the full 32-bit resource identifier for the event in the message resource file for the event source. Two event log entries from the same source can have matching EventLogEntry.EventID values, but have different EventLogEntry.InstanceId values due to differences in the top two bits of the event identifier.

If the application wrote the event entry using one of the erload:System.Diagnostics.EventLog.WriteEntry methods, the EventLogEntry.EventID property matches the optional eventId parameter. If the application wrote the event using erload:System.Diagnostics.EventLog.WriteEvent or the Win32 API ReportEvent, the EventLogEntry.EventID property matches the resource identifier for the event, with the top two bits masked off.

Requirements

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