Clear Windows Logs with C#

EventLog class.

void ClearLogs()
{
	try
	{
		foreach (EventLog eventLog in EventLog.GetEventLogs())
		{
			eventLog.Clear();
			eventLog.Dispose();
		}
	}
	catch
	{
		//...
	}
}
Categories: C# Tags: , ,
%d bloggers like this: