DirectoryEntry.CopyTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a copy of this entry.
Overloads
CopyTo(DirectoryEntry) |
Creates a copy of this entry as a child of the specified parent. |
CopyTo(DirectoryEntry, String) |
Creates a copy of this DirectoryEntry object, as a child of the specified parent DirectoryEntry object, with the specified new name. |
CopyTo(DirectoryEntry)
- Source:
- DirectoryEntry.cs
- Source:
- DirectoryEntry.cs
- Source:
- DirectoryEntry.cs
- Source:
- DirectoryEntry.cs
Creates a copy of this entry as a child of the specified parent.
public:
System::DirectoryServices::DirectoryEntry ^ CopyTo(System::DirectoryServices::DirectoryEntry ^ newParent);
public System.DirectoryServices.DirectoryEntry CopyTo (System.DirectoryServices.DirectoryEntry newParent);
member this.CopyTo : System.DirectoryServices.DirectoryEntry -> System.DirectoryServices.DirectoryEntry
Public Function CopyTo (newParent As DirectoryEntry) As DirectoryEntry
Parameters
- newParent
- DirectoryEntry
The distinguished name of the DirectoryEntry object that will be the parent for the copy that is being created.
Returns
A DirectoryEntry object that represents the copy of this entry as a child of the new parent.
Exceptions
The specified DirectoryEntry is not a container.
Remarks
If UsePropertyCache is true
, call CommitChanges on the new object to make the copy permanent.
The Lightweight Directory Access Protocol (LDAP) provider does not currently support the CopyTo(DirectoryEntry) method.
Applies to
CopyTo(DirectoryEntry, String)
- Source:
- DirectoryEntry.cs
- Source:
- DirectoryEntry.cs
- Source:
- DirectoryEntry.cs
- Source:
- DirectoryEntry.cs
Creates a copy of this DirectoryEntry object, as a child of the specified parent DirectoryEntry object, with the specified new name.
public:
System::DirectoryServices::DirectoryEntry ^ CopyTo(System::DirectoryServices::DirectoryEntry ^ newParent, System::String ^ newName);
public System.DirectoryServices.DirectoryEntry CopyTo (System.DirectoryServices.DirectoryEntry newParent, string? newName);
public System.DirectoryServices.DirectoryEntry CopyTo (System.DirectoryServices.DirectoryEntry newParent, string newName);
member this.CopyTo : System.DirectoryServices.DirectoryEntry * string -> System.DirectoryServices.DirectoryEntry
Public Function CopyTo (newParent As DirectoryEntry, newName As String) As DirectoryEntry
Parameters
- newParent
- DirectoryEntry
The DN of the DirectoryEntry object that will be the parent for the copy that is being created.
- newName
- String
The name of the copy of this entry.
Returns
A renamed copy of this entry as a child of the specified parent.
Exceptions
The specified DirectoryEntry object is not a container.
Remarks
The Lightweight Directory Access Protocol (LDAP) provider does not currently support this method.
If UsePropertyCache is true
, call CommitChanges on the new object to make the copy permanent.