Share via


SqlErrorCollection.CopyTo Method

Definition

Overloads

CopyTo(SqlError[], Int32)

Copies the elements of the SqlErrorCollection collection into a SqlErrorCollection, starting at the specified index.

CopyTo(Array, Int32)

Copies the elements of the SqlErrorCollection collection into an Array, starting at the specified index.

CopyTo(SqlError[], Int32)

Copies the elements of the SqlErrorCollection collection into a SqlErrorCollection, starting at the specified index.

public:
 void CopyTo(cli::array <Microsoft::Data::SqlClient::SqlError ^> ^ array, int index);
public void CopyTo (Microsoft.Data.SqlClient.SqlError[] array, int index);
member this.CopyTo : Microsoft.Data.SqlClient.SqlError[] * int -> unit
Public Sub CopyTo (array As SqlError(), index As Integer)

Parameters

array
SqlError[]

The SqlErrorCollection to copy the elements into.

index
Int32

The index from which to start copying into the array parameter.

Exceptions

The sum of index and the number of elements in the SqlErrorCollection collection is greater than the length of the SqlErrorCollection.

The array is null.

The index is not valid for array.

Applies to

CopyTo(Array, Int32)

Copies the elements of the SqlErrorCollection collection into an Array, starting at the specified index.

public:
 virtual void CopyTo(Array ^ array, int index);
public void CopyTo (Array array, int index);
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)

Parameters

array
Array

The Array to copy elements into.

index
Int32

The index from which to start copying into the array parameter.

Implements

Exceptions

The sum of index and the number of elements in the SqlErrorCollection collection is greater than the Length of the Array.

The array is null.

The index is not valid for array.

Applies to