MoveTo Method (DirectoryEntry)
Collapse the table of content
Expand the table of content

DirectoryEntry.MoveTo Method (DirectoryEntry)


Moves this DirectoryEntry object to the specified parent.

Namespace:   System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public void MoveTo(
	DirectoryEntry newParent


Type: System.DirectoryServices.DirectoryEntry

The parent to which you want to move this entry.

Exception Condition

The specified DirectoryEntry is not a container.

If UsePropertyCache is true, call the CommitChanges method on the new object to make the move permanent.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft