System.Diagnostics.EventInstance.InstanceId Property

Gets or sets the resource identifier that designates the message text of the event entry.

Syntax

public long InstanceId { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The EventInstance.InstanceId property uniquely identifies an event entry for a configured event source. For events defined in message resource files, the EventInstance.InstanceId corresponds to the resource identifier compiled from the message definition fields in the message text file. Your application can write localized event log entries by setting the EventInstance.InstanceId to a resource identifier. The Event Viewer uses the EventInstance.InstanceId resource identifier to find and display the corresponding string from the localized resource file based on current language settings. You must register the source with the corresponding resource file before you write events using resource identifiers.

For details about defining event messages and building event log resource files, see the "Message Compiler" topic in the Platform SDK documentation at tp://msdn.microsoft.com/. For details about event log identifiers, see the "Event Identifiers" topic in the Platform SDK.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0