編集

次の方法で共有


PrincipalCollection.CopyTo(Principal[], Int32) Method

Definition

Copies the Principal objects from this PrincipalCollection into the specified array, starting at the specified position index in array.

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

Parameters

array
Principal[]

The Array that should be populated with Principal objects.

index
Int32

The position in array into which the first principal object in the collection should be copied.

Implements

Remarks

array must be one-dimensional. If it is not, an ArgumentException is thrown. Further exceptions are thrown if the number of elements to copy is greater than the available space from index to the end of array, if array is null, or if index is less than 0.

Applies to