DirectoryEntry.Close DirectoryEntry.Close DirectoryEntry.Close DirectoryEntry.Close Method

定義

關閉 DirectoryEntry 物件並釋放與這個元件相關聯的任何系統資源。Closes the DirectoryEntry object and releases any system resources that are associated with this component.

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

備註

呼叫這個方法以釋放未受管理的系統資源,而不等候垃圾收集。Call this method to release unmanaged system resources, without waiting for garbage collection.

呼叫Close之後,上的DirectoryEntry任何作業可能會引發例外狀況。Following a call to Close, any operations on the DirectoryEntry might raise exceptions.

適用於