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.

44 Views
using System.Diagnostics;

private void Form1_Load(object sender, EventArgs e)
{
EventLog evlog = new EventLog("Application");
evlog.Source  = "Shalvin";
evlog.WriteEntry("Shalvin.com", EventLogEntryType.Information);
}
About the Author

Microsoft Professional with more than 10 years of experience.
Coordinator of Cochin .Net User group http://groups.msn.com/cochindotnet

Email : shalvin@gmail.com
Blog : http://shalvinpd.blogspot.com
Site : http://shalvin.com