SqlErrorCollection.CopyTo Method

Definition

Copies the elements of the SqlErrorCollection collection.

Overloads

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.

CopyTo(Array, Int32)

Source:
System.Data.SqlClient.notsupported.cs

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

C#
public void CopyTo(Array array, int index);

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.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

CopyTo(SqlError[], Int32)

Source:
System.Data.SqlClient.notsupported.cs

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

C#
public void CopyTo(System.Data.SqlClient.SqlError[] array, int index);

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.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)