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.

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);
}
1
Contributor
0
Replies
2
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.