DirectoryEntry.CopyTo DirectoryEntry.CopyTo DirectoryEntry.CopyTo DirectoryEntry.CopyTo Method

Definition

Creates a copy of this entry.

Overloads

CopyTo(DirectoryEntry) CopyTo(DirectoryEntry) CopyTo(DirectoryEntry) CopyTo(DirectoryEntry)

Creates a copy of this entry as a child of the specified parent.

CopyTo(DirectoryEntry, String) CopyTo(DirectoryEntry, String) CopyTo(DirectoryEntry, String) 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) CopyTo(DirectoryEntry) CopyTo(DirectoryEntry) CopyTo(DirectoryEntry)

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 DirectoryEntry DirectoryEntry 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

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.

Security

DirectoryServicesPermission
To make a copy of the specified DirectoryEntry object.

CopyTo(DirectoryEntry, String) CopyTo(DirectoryEntry, String) CopyTo(DirectoryEntry, String) CopyTo(DirectoryEntry, String)

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);
member this.CopyTo : System.DirectoryServices.DirectoryEntry * string -> System.DirectoryServices.DirectoryEntry
Public Function CopyTo (newParent As DirectoryEntry, newName As String) As DirectoryEntry

Parameters

newParent
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

The DN of the DirectoryEntry object that will be the parent for the copy that is being created.

newName
String String String String

The name of the copy of this entry.

Returns

A renamed copy of this entry as a child of the specified parent.

Exceptions

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.

Security

DirectoryServicesPermission
To make a copy of the entry.

See also

Applies to