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

定義

建立這個項目的複本。Creates a copy of this entry.

多載

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)

以指定的新名稱建立這個 DirectoryEntry 物件的複本,做為指定之父 DirectoryEntry 物件的子系。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

參數

newParent
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

DirectoryEntry 物件的辨別名稱,將成為正在建立之複本的父代。The distinguished name of the DirectoryEntry object that will be the parent for the copy that is being created.

傳回

DirectoryEntry 物件,表示這個項目的複本,做為新父代的子系。A DirectoryEntry object that represents the copy of this entry as a child of the new parent.

例外狀況

備註

如果UsePropertyCache CommitChangestrue,請在新的物件上呼叫,使複本成為永久性。If UsePropertyCache is true, call CommitChanges on the new object to make the copy permanent.

輕量型目錄存取協定(LDAP)提供者目前不支援CopyTo(DirectoryEntry)方法。The Lightweight Directory Access Protocol (LDAP) provider does not currently support the CopyTo(DirectoryEntry) method.

安全性

DirectoryServicesPermission
建立指定DirectoryEntry之物件的複本。To make a copy of the specified DirectoryEntry object.

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

以指定的新名稱建立這個 DirectoryEntry 物件的複本,做為指定之父 DirectoryEntry 物件的子系。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

參數

newParent
DirectoryEntry DirectoryEntry DirectoryEntry DirectoryEntry

DirectoryEntry 物件的 DN,將成為正在建立之複本的父代。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.

傳回

這個項目的已重新命名複本,做為指定之父代的子系。A renamed copy of this entry as a child of the specified parent.

例外狀況

備註

輕量型目錄存取協定(LDAP)提供者目前不支援這個方法。The Lightweight Directory Access Protocol (LDAP) provider does not currently support this method.

如果UsePropertyCache CommitChangestrue,請在新的物件上呼叫,使複本成為永久性。If UsePropertyCache is true, call CommitChanges on the new object to make the copy permanent.

安全性

DirectoryServicesPermission
建立專案的複本。To make a copy of the entry.

另請參閱

適用於