DirectoryEntry.CopyTo 方法

定義

建立這個項目的複本。

多載

CopyTo(DirectoryEntry)

建立這個項目的複本,以做為指定之父系的子系。

CopyTo(DirectoryEntry, String)

以指定的新名稱建立這個 DirectoryEntry 物件的複本,以做為指定之父 DirectoryEntry 物件的子系。

CopyTo(DirectoryEntry)

來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs

建立這個項目的複本,以做為指定之父系的子系。

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 不是容器。

備註

如果 UsePropertyCachetrue,請在新的 物件上呼叫 CommitChanges ,讓複本成為永久複本。

輕量型目錄存取通訊協定 (LDAP) 提供者目前不支援 CopyTo(DirectoryEntry) 方法。

適用於

CopyTo(DirectoryEntry, String)

來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs
來源:
DirectoryEntry.cs

以指定的新名稱建立這個 DirectoryEntry 物件的複本,以做為指定之父 DirectoryEntry 物件的子系。

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

參數

newParent
DirectoryEntry

DirectoryEntry 物件的 DN,此物件將成為所建立之複本的父系。

newName
String

這個項目的複本名稱。

傳回

這個項目的重新命名複本,做為指定之父系的子系。

例外狀況

指定的 DirectoryEntry 物件不是容器。

備註

輕量型目錄存取通訊協定 (LDAP) 提供者目前不支援此方法。

如果 UsePropertyCachetrue,請在新的 物件上呼叫 CommitChanges ,讓複本成為永久複本。

另請參閱

適用於