Gets or sets the resource identifier that specifies the application-defined category of the event entry.
Documentation for this section has not yet been entered.
Event log categories are application-defined values that help filter events, or provide further information about the event. For example, your application can define separate categories for different components or different operations.
Set the EventInstance.CategoryId property to specify the category that the Event Viewer displays for the entry. The Event Viewer can display the category as a numeric value, or it can use the EventInstance.CategoryId as a resource identifier to display a localized category string based on the current language settings.
To display localized category strings in the Event Viewer, you must use an event source configured with a category resource file, and set the EventInstance.CategoryId to a resource identifier in the category resource file. If the event source does not have a configured category resource file, or the specified EventInstance.CategoryId does not index a string in the category resource file, and then the Event Viewer displays the numeric category value for that entry.
You must register the source with the corresponding resource file before you write event categories using resource identifiers. Configure the category resource file, along with the number of category strings in the resource file, using the System.Diagnostics.EventLogInstaller or the System.Diagnostics.EventSourceCreationData class. When defining category strings in a resource file, the category resource identifiers must be numbered consecutively starting at 1, up to the configured EventSourceCreationData.CategoryCount property value.
Event categories are optional. If your application does not use categories, do not set the EventInstance.CategoryId for the event log entry.
For details about defining event messages and building event resource files, see the "Message Compiler" topic in the Platform SDK documentation at tp://msdn.microsoft.com/. For details about defining event categories in resource files, see the "Event Categories" topic in the Platform SDK