DirectoryEntry::MoveTo Method (DirectoryEntry^, String^)
.NET Framework (current version)
Moves this DirectoryEntry object to the specified parent and changes its name to the specified value.
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
Parameters
- newParent
-
Type:
System.DirectoryServices::DirectoryEntry^
The parent to which you want to move this entry.
- newName
-
Type:
System::String^
The new name of this entry.
| Exception | Condition |
|---|---|
| InvalidOperationException | The specified DirectoryEntry is not a container. |
If UsePropertyCache is true, call CommitChanges on the new object to make the move permanent.
.NET Framework
Available since 1.1
Available since 1.1
Show: