Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

EventLogEntry.EventID Property

Note: This API 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.  http://go.microsoft.com/fwlink/?linkid=14202")]
public int EventID { get; }

Property Value

Type: System.Int32
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.

.NET Framework

Supported in: 1.1, 1.0
Obsolete (compiler warning) in 4.5.1
Obsolete (compiler warning) in 4.5
Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3.5
Obsolete (compiler warning) in 3.5 SP1
Obsolete (compiler warning) in 3.0
Obsolete (compiler warning) in 3.0 SP1
Obsolete (compiler warning) in 3.0 SP2
Obsolete (compiler warning) in 2.0
Obsolete (compiler warning) in 2.0 SP1
Obsolete (compiler warning) in 2.0 SP2

.NET Framework Client Profile

Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.