ForestTrustRelationshipCollisionCollection.CopyTo(ForestTrustRelationshipCollision[], Int32) 方法

定义

将此集合中的所有 ForestTrustRelationshipCollision 对象复制到指定的数组中,从目标数组的指定索引处开始。Copies all ForestTrustRelationshipCollision objects in this collection to the specified array, starting at the specified index of the target array.

public:
 void CopyTo(cli::array <System::DirectoryServices::ActiveDirectory::ForestTrustRelationshipCollision ^> ^ array, int index);
public void CopyTo (System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollision[] array, int index);
member this.CopyTo : System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollision[] * int -> unit
Public Sub CopyTo (array As ForestTrustRelationshipCollision(), index As Integer)

参数

array
ForestTrustRelationshipCollision[]

接收此集合元素的 ForestTrustRelationshipCollision 对象的数组。The array of ForestTrustRelationshipCollision objects that receives the elements of this collection.

index
Int32

array 中从零开始的索引,此方法从该位置开始复制此集合。The zero-based index in array where this method starts copying this collection.

例外

对基础目录服务的调用导致了错误。A call to the underlying directory service resulted in an error.

对于源集合的大小和指定的 index 而言,目标数组不够大。The destination array is not large enough, based on the source collection size and the index specified.

arraynullarray is null.

指定的 index 超出了目标数组的范围。The index specified is out of range of the destination array.

适用于

另请参阅