DirectoryEntry.CopyTo 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立這個項目的複本。
CopyTo(DirectoryEntry) |
建立這個項目的複本,以做為指定之父系的子系。 |
CopyTo(DirectoryEntry, String) |
以指定的新名稱建立這個 DirectoryEntry 物件的複本,以做為指定之父 DirectoryEntry 物件的子系。 |
建立這個項目的複本,以做為指定之父系的子系。
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 不是容器。
備註
如果 UsePropertyCache 為 true
,請在新的 物件上呼叫 CommitChanges ,讓複本成為永久複本。
輕量型目錄存取通訊協定 (LDAP) 提供者目前不支援 CopyTo(DirectoryEntry) 方法。
適用於
.NET Framework 4.8.1 及其他版本
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
以指定的新名稱建立這個 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) 提供者目前不支援此方法。
如果 UsePropertyCache 為 true
,請在新的 物件上呼叫 CommitChanges ,讓複本成為永久複本。
另請參閱
適用於
.NET Framework 4.8.1 及其他版本
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |