This documentation is archived and is not being maintained.

EventLogEntry.EventID Property

NOTE: This property is now obsolete.

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

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

[ObsoleteAttribute("This property has been deprecated.  Please use System.Diagnostics.EventLogEntry.InstanceId instead.")] 
public int EventID { get; }
/** @property */
public int get_EventID ()

public function get EventID () : int

Not applicable.

Property Value

The application-specific identifier for the event message.

This value represents the event identifier for the entry in the event log, with the top two bits masked off. The 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 EventID values, but have different 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 WriteEntry methods, the EventID property matches the optional eventId parameter. If the application wrote the event using WriteEvent or the Win32 API ReportEvent, the EventID property matches the resource identifier for the event, with the top two bits masked off.

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: 1.0, 1.1, 2.0
Obsolete (compiler warning) in 3.0