NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DirectoryEntry.MoveTo (DirectoryEntry, String)

Moves this entry to the given parent, and gives it a new name.

[Visual Basic]
Overloads Public Sub MoveTo( _
   ByVal newParent As DirectoryEntry, _
   ByVal newName As String _
)
[C#]
public void MoveTo(
   DirectoryEntry newParent,
   string newName
);
[C++]
public: void MoveTo(
   DirectoryEntry* newParent,
   String* newName
);
[JScript]
public function MoveTo(
   newParent : DirectoryEntry,
   newName : String
);

Parameters

newParent
The parent to which you want to move this entry.
newName
The new name of this entry.

Exceptions

Exception Type Condition
COMException The given DirectoryEntry does not exist. The associated error code is E_ADS_UNKNOWN_OBJECT.
InvalidOperationException The given DirectoryEntry is not capable of being a parent.

See Also

DirectoryEntry Class | DirectoryEntry Members | System.DirectoryServices Namespace | DirectoryEntry.MoveTo Overload List