DirectoryEntry.CommitChanges DirectoryEntry.CommitChanges DirectoryEntry.CommitChanges DirectoryEntry.CommitChanges Method

定義

將目錄項目的變更儲存至基礎目錄存放區。Saves changes that are made to a directory entry to the underlying directory store.

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

備註

根據預設,屬性的變更是在本機對快取進行,而要讀取的屬性值會在第一次讀取之後快取。By default, changes to properties are made locally to a cache, and property values to be read are cached after the first read. 如需詳細資訊,請參閱UsePropertyCacheFor more information, see UsePropertyCache.

對快取所做的變更包括對屬性所做的變更, Add以及對的呼叫(如果這是新建立的專案)。Changes made to the cache include changes to the properties as well as calls to Add (if this is the newly created entry).

警告

如果您在RefreshCache呼叫CommitChanges之前呼叫,將會遺失對屬性快取的任何未認可變更。If you call RefreshCache before calling CommitChanges, any uncommitted changes to the property cache will be lost.

安全性Security

安全性

DirectoryServicesPermission
以認可變更。To commit the changes.

適用於

另請參閱