SqlErrorCollection::CopyTo Method (array<SqlError^>^, Int32)

 

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

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public:
void CopyTo(
	array<SqlError^>^ array,
	int index
)

Parameters

array
Type: array<System.Data.SqlClient::SqlError^>^

The SqlErrorCollection to copy the elements into.

index
Type: System::Int32

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

Exception Condition
ArgumentException

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

ArgumentNullException

The array is null.

ArgumentOutOfRangeException

The index is not valid for array.

.NET Framework
Available since 2.0
Return to top
Show: