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 );
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. |
DirectoryEntry Class | DirectoryEntry Members | System.DirectoryServices Namespace | DirectoryEntry.MoveTo Overload List