944,218 Members | Top Members by Rank

Ad:
  • C# Code Snippet
  • Views: 3157
  • C# RSS
0

Writing to EventLog - Shalvin

by on Mar 31st, 2008
EventViewer can be accessed by Selecting Event Viewer from Administrative Tools of Control Panel. This code snippet will add an Entry called Shalvin inside the Application section.
C# Code Snippet (Toggle Plain Text)
  1. using System.Diagnostics;
  2.  
  3. private void Form1_Load(object sender, EventArgs e)
  4. {
  5. EventLog evlog = new EventLog("Application");
  6. evlog.Source = "Shalvin";
  7. evlog.WriteEntry("Shalvin.com", EventLogEntryType.Information);
  8. }
Message:
Previous Thread in C# Forum Timeline: PDF Viewer
Next Thread in C# Forum Timeline: compiler for c#





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC