Pages

Wednesday, March 6, 2013

Add log to Event viewer C#


string sSource;
string sLog;
string sEvent;
sSource = "dotNET Sample App";
sLog = "Application";
System.Diagnostics.EventLog.WriteEntry(sSource, "hello"                        
                                System.Diagnostics.EventLogEntryType.Warning, 233);

No comments:

Post a Comment