This article will show you how you can read the windows event
log using c#.net. For reading event log of windows we need these two assemblies
System.dll, System.Diagnostics.EventLog.dll.
So here is the code for reading the event log:
EventLog[] _eventLogs;
_eventLogs = EventLog.GetEventLogs();
foreach (EventLog data in _eventLogs)
{
Console.WriteLine("Log Name: "
+ data.Log);
}
|
Here is the execution result.
0 comments:
Please let me know your view