次の方法で共有


PSDataCollection<T>.CopyTo(T[], Int32) Method

Definition

Copies the elements of the buffer to a specified array, starting at a particular index.

public:
 virtual void CopyTo(cli::array <T> ^ array, int arrayIndex);
public void CopyTo (T[] array, int arrayIndex);
abstract member CopyTo : 'T[] * int -> unit
override this.CopyTo : 'T[] * int -> unit
Public Sub CopyTo (array As T(), arrayIndex As Integer)

Parameters

array
T[]

The destination Array for the elements of type T copied from the buffer.

arrayIndex
Int32

The zero-based index in the array at which copying begins.

Implements

Exceptions

array is multidimensional. (or) arrayIndex is equal to or greater than the length of array. (or) The number of elements in the source buffer is greater than the available space from arrayIndex to the end of the destination array. (or) Type T cannot be cast automatically to the type of the destination array.

array is a null reference

arrayIndex is less than 0.

Applies to