Writing to EventLog - Shalvin

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Shalvin Shalvin is offline Offline Mar 31st, 2008, 2:20 am |
0
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.
Quick reply to this message  
C# Syntax
  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:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC