Start New Discussion within our Software Development Community

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.

using System.Diagnostics;

private void Form1_Load(object sender, EventArgs e)
EventLog evlog = new EventLog("Application");
evlog.Source  = "Shalvin";
evlog.WriteEntry("", EventLogEntryType.Information);