DirectoryEntry.MoveTo 方法

定義

移動這個 DirectoryEntry

多載

MoveTo(DirectoryEntry)

將這個 DirectoryEntry 物件移至指定的父系。

MoveTo(DirectoryEntry, String)

將這個 DirectoryEntry 物件移至指定的父系,並將其名稱變更為指定的值。

MoveTo(DirectoryEntry)

來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs

將這個 DirectoryEntry 物件移至指定的父系。

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 不是容器。

備註

如果 UsePropertyCachetrue,請在新的 物件上呼叫 CommitChanges 方法,使移動永久。

另請參閱

適用於

MoveTo(DirectoryEntry, String)

來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs

將這個 DirectoryEntry 物件移至指定的父系,並將其名稱變更為指定的值。

public:
 void MoveTo(System::DirectoryServices::DirectoryEntry ^ newParent, System::String ^ newName);
public void MoveTo (System.DirectoryServices.DirectoryEntry newParent, 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

要將這個項目移動至的父系。

newName
String

這個項目的新名稱。

例外狀況

指定的 DirectoryEntry 不是容器。

備註

如果 UsePropertyCachetrue,請在新的 物件上呼叫 CommitChanges ,使移動永久。

另請參閱

適用於