Archive for November, 2003

C# Event Log

By admin - Last updated: Saturday, November 1, 2003

using System.Diagnostics; public void WriteEventLog(string appName, string logDetail) {  if (!System.Diagnostics.EventLog.SourceExists(appName))   System.Diagnostics.EventLog.CreateEventSource(appName,”Application”);   EventLog EventLog1 = new EventLog();   EventLog1.Source = appName;   EventLog1.WriteEntry (logDetail, EventLogEntryType.Error); }