Writing to the Event Log in C #

When I’m writing code, I don’t like to spend a lot of time fumbling around the framework.  Like tonight, I was looking for a simple way to write to the event log in Windows.  I went to Google and did a quick search and found the Microsoft knowledge base article entitled “How to write to an event log by using Visual C#“.

In less than 2 minutes I was able use this code to create a routine that allowed me to write to the event log.