Creates a copy of this entry as a child of the given parent and gives it a new name.
[Visual Basic] Overloads Public Function CopyTo( _ ByVal newParent As DirectoryEntry, _ ByVal newName As String _ ) As DirectoryEntry [C#] public DirectoryEntry CopyTo( DirectoryEntry newParent, string newName ); [C++] public: DirectoryEntry* CopyTo( DirectoryEntry* newParent, String* newName ); [JScript] public function CopyTo( newParent : DirectoryEntry, newName : String ) : DirectoryEntry;
A renamed copy of this entry as a child of the given parent.
Exception Type | Condition |
---|---|
COMException | The given DirectoryEntry does not exist. The associated error code is E_ADS_UNKNOWN_OBJECT. |
DirectoryEntry Class | DirectoryEntry Members | System.DirectoryServices Namespace | DirectoryEntry.CopyTo Overload List