EventLog.Close EventLog.Close EventLog.Close EventLog.Close Method

定義

關閉事件記錄檔,並釋放讀取和寫入控制代碼。Closes the event log and releases read and write handles.

public:
 void Close();
public void Close ();
member this.Close : unit -> unit
Public Sub Close ()

例外狀況

事件記錄檔的讀取控制代碼或寫入控制代碼未成功釋放。The event log's read handle or write handle was not released successfully.

備註

Close方法會呼叫受保護的Dispose方法。The Close method is called by the protected Dispose method. 您不需要叫用Close再呼叫DisposeYou do not need to invoke Close before calling Dispose.

安全性

EventLogPermission
用於寫入在電腦上的事件記錄檔資訊。for writing the event log information on the computer. 相關聯的列舉型別: WriteAssociated enumeration: Write

適用於

另請參閱