DirectoryEntry.MoveTo DirectoryEntry.MoveTo DirectoryEntry.MoveTo DirectoryEntry.MoveTo Method

定義

移動這個 DirectoryEntryMoves this DirectoryEntry.

多載

MoveTo(DirectoryEntry) MoveTo(DirectoryEntry) MoveTo(DirectoryEntry) MoveTo(DirectoryEntry)

將這個 DirectoryEntry 物件移至指定的父代。Moves this DirectoryEntry object to the specified parent.

MoveTo(DirectoryEntry, String) MoveTo(DirectoryEntry, String) MoveTo(DirectoryEntry, String) MoveTo(DirectoryEntry, String)

將這個 DirectoryEntry 物件移至指定的父代,並將其名稱變更為指定的值。Moves this DirectoryEntry object to the specified parent and changes its name to the specified value.

MoveTo(DirectoryEntry) MoveTo(DirectoryEntry) MoveTo(DirectoryEntry) MoveTo(DirectoryEntry)

將這個 DirectoryEntry 物件移至指定的父代。Moves this DirectoryEntry object to the specified parent.

public:
 void MoveTo(System::DirectoryServices::DirectoryEntry ^ newParent);
public void MoveTo (System.DirectoryServices.DirectoryEntry newParent);
member this.MoveTo : System.DirectoryServices.DirectoryEntry -> unit
Public Sub MoveTo (newParent As DirectoryEntry)

參數

newParent
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

要將這個項目移動至的父代。The parent to which you want to move this entry.

例外狀況

備註

如果UsePropertyCache CommitChangestrue,請在新的物件上呼叫方法,使移動成為永久的。If UsePropertyCache is true, call the CommitChanges method on the new object to make the move permanent.

安全性

DirectoryServicesPermission
以移動專案。To move the entry.

另請參閱

MoveTo(DirectoryEntry, String) MoveTo(DirectoryEntry, String) MoveTo(DirectoryEntry, String) MoveTo(DirectoryEntry, String)

將這個 DirectoryEntry 物件移至指定的父代,並將其名稱變更為指定的值。Moves this DirectoryEntry object to the specified parent and changes its name to the specified value.

public:
 void MoveTo(System::DirectoryServices::DirectoryEntry ^ newParent, System::String ^ newName);
public void MoveTo (System.DirectoryServices.DirectoryEntry newParent, string newName);
member this.MoveTo : System.DirectoryServices.DirectoryEntry * string -> unit
Public Sub MoveTo (newParent As DirectoryEntry, newName As String)

參數

newParent
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

要將這個項目移動至的父代。The parent to which you want to move this entry.

newName
String String String String

這個項目的新名稱。The new name of this entry.

例外狀況

備註

如果UsePropertyCache CommitChangestrue,請在新的物件上呼叫,使移動成為永久的。If UsePropertyCache is true, call CommitChanges on the new object to make the move permanent.

另請參閱

適用於