Vector<T>.CopyTo Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

CopyTo(ArraySlice<T>) Copies the elements of this vector to an array.
CopyTo(IVector) Copies the elements of this vector to an untyped vector.
CopyTo(T[]) Copies the elements of this vector to an array.
CopyTo(Vector<T>) Copies the elements of this vector to another vector.
CopyTo(T[], Int32) Copies the elements of this vector to an array.
CopyTo(Vector<T>, Int32) Copies the elements of this vector to another vector starting at the specified position.

Vector<T>.CopyTo(ArraySlice<T>)

Copies the elements of this vector to an array.
C#
public virtual void CopyTo(
	ArraySlice<T> array
)

Parameters

array  ArraySlice<T>
An array that is to hold the elements of this Vector<T>.

Exceptions

ArgumentNullExceptionarray is null
ArgumentException The length of array is less than the length of this instance.

Vector<T>.CopyTo(IVector)

Copies the elements of this vector to an untyped vector.
C#
public Vector<T> CopyTo(
	IVector destination
)

Parameters

destination  IVector
A vector whose elements are to be set.

Return Value

Vector<T>
A reference to the destination vector.

Remarks

The element type of the destination vector must be the same as the element type of the source vector.

Exceptions

ArgumentException The length of destination is less than the length of this instance.
InvalidCastExceptionThe element type of destination does not equal the element type of the vector.

Vector<T>.CopyTo(T[])

Copies the elements of this vector to an array.
C#
public void CopyTo(
	T[] array
)

Parameters

array  T[]
An array that is to hold the elements of this Vector<T>.

Exceptions

ArgumentNullExceptionarray is null
ArgumentException The length of array is less than the length of this instance.

Vector<T>.CopyTo(Vector<T>)

Copies the elements of this vector to another vector.
C#
public Vector<T> CopyTo(
	Vector<T> destination
)

Parameters

destination  Vector<T>
A vector whose elements are to be set.

Return Value

Vector<T>
A reference to the destination vector.

Exceptions

ArgumentException The length of destination is less than the length of this instance.

Vector<T>.CopyTo(T[], Int32)

Copies the elements of this vector to an array.
C#
public void CopyTo(
	T[] array,
	int index
)

Parameters

array  T[]
An array that is to hold the elements of this Vector<T>.
index  Int32
Index into array where copying is to start.

Exceptions

ArgumentNullExceptionarray is null
ArgumentException The length of array is less than the length of this instance.

Vector<T>.CopyTo(Vector<T>, Int32)

Copies the elements of this vector to another vector starting at the specified position.
C#
public virtual Vector<T> CopyTo(
	Vector<T> destination,
	int index
)

Parameters

destination  Vector<T>
A vector whose elements are to be set.
index  Int32
The index in destination where copying is to start.

Return Value

Vector<T>
A reference to the destination vector.

Exceptions

ArgumentNullExceptiondestination is null
ArgumentOutOfRangeExceptionindex is less than zero.
ArgumentException The length of destination is less than index plus the length of this instance.

See Also