Documentation for this section has not yet been entered.
This property retrieves only the replacement strings for the entry. To retrieve the full message, read the EventLogEntry.Message property.
The EventLogEntry.ReplacementStrings property contains the localized versions of replacement strings that are used in the event log entry. If you provide resource files that contain strings in each target language for your application, you can emit event log messages in the language that is used on that computer. To do that, create an instance of the System.Resources.ResourceManager class for the resource assembly that contains your replacement strings. The first parameter of the System.Resources.ResourceManager.#ctor(string, System.Reflection.Assembly) constructor identifies the resource assembly to be used. Use the System.Resources.ResourceManager.GetString(string) method of that instance to supply localized messages for log events. The following code automatically sets the message to the language for the current culture.
Example
ResourceManager LocRM = new ResourceManager("ReplacementStrings.TestStrings", typeof(Program).Assembly); EventLog e1 = new EventLog("LocTest", "MyMachine", "LocTest"); // Get the string associated with the current culture. e1.WriteEntry(LocRM.GetString("strMessage"), EventLogEntryType.Information);
For information about how to create localized resource files, see Walkthrough: Localizing Windows Forms.