Frees all resources held by the EventLog.
[Visual Basic] Overrides Public Sub Dispose() [C#] public override void Dispose(); [C++] public: override void Dispose(); [JScript] public override function Dispose();
Exception Type | Condition |
---|---|
Win32Exception | The event log's read handle or write handle was not released successfully. |
After closing the event log, this method releases read and write handles. Dispose closes the event log by calling Close, which can trigger exceptions that your calling method must handle.
EventLog Class | EventLog Members | System.Diagnostics Namespace | Close | Dispose