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
)

Parameters

newParent
Type: System.DirectoryServices.DirectoryEntry

The parent to which you want to move this entry.

Exception Condition
InvalidOperationException

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
Show: