Editar

Compartir a través de


EventLogEntry.EventID Property

Definition

Caution

EventLogEntry.EventID has been deprecated. Use System.Diagnostics.EventLogEntry.InstanceId instead.

Caution

This property has been deprecated. Please use System.Diagnostics.EventLogEntry.InstanceId instead. http://go.microsoft.com/fwlink/?linkid=14202

Caution

This property has been deprecated. Please use System.Diagnostics.EventLogEntry.InstanceId instead. https://go.microsoft.com/fwlink/?linkid=14202

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

public:
 property int EventID { int get(); };
[System.Obsolete("EventLogEntry.EventID has been deprecated. Use System.Diagnostics.EventLogEntry.InstanceId instead.")]
public int EventID { get; }
public int EventID { get; }
[System.Obsolete("This property has been deprecated.  Please use System.Diagnostics.EventLogEntry.InstanceId instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
public int EventID { get; }
[System.Obsolete("This property has been deprecated.  Please use System.Diagnostics.EventLogEntry.InstanceId instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
public int EventID { get; }
[<System.Obsolete("EventLogEntry.EventID has been deprecated. Use System.Diagnostics.EventLogEntry.InstanceId instead.")>]
member this.EventID : int
member this.EventID : int
[<System.Obsolete("This property has been deprecated.  Please use System.Diagnostics.EventLogEntry.InstanceId instead.  http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.EventID : int
[<System.Obsolete("This property has been deprecated.  Please use System.Diagnostics.EventLogEntry.InstanceId instead.  https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.EventID : int
Public ReadOnly Property EventID As Integer

Property Value

The application-specific identifier for the event message.

Attributes

Remarks

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 Windows API ReportEvent, the EventID property matches the resource identifier for the event, with the top two bits masked off.

Applies to

See also