SqlErrorCollection.CopyTo 方法

定義

複製 SqlErrorCollection 集合的項目。Copies the elements of the SqlErrorCollection collection.

多載

CopyTo(Array, Int32)

從指定的索引開始,將 SqlErrorCollection 集合的項目複製到 ArrayCopies the elements of the SqlErrorCollection collection into an Array, starting at the specified index.

CopyTo(SqlError[], Int32)

從指定的索引開始,將 SqlErrorCollection 集合的項目複製到 SqlErrorCollectionCopies the elements of the SqlErrorCollection collection into a SqlErrorCollection, starting at the specified index.

CopyTo(Array, Int32)

從指定的索引開始,將 SqlErrorCollection 集合的項目複製到 ArrayCopies 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)

參數

array
Array

要複製元素到其中的 ArrayThe Array to copy elements into.

index
Int32

要開始複製到 array 參數中的索引。The index from which to start copying into the array parameter.

實作

例外狀況

index 的總和,以及 SqlErrorCollection 集合中的元素數目,大於 LengthArrayThe sum of index and the number of elements in the SqlErrorCollection collection is greater than the Length of the Array.

arraynullThe array is null.

indexarray 無效。The index is not valid for array.

另請參閱

CopyTo(SqlError[], Int32)

從指定的索引開始,將 SqlErrorCollection 集合的項目複製到 SqlErrorCollectionCopies the elements of the SqlErrorCollection collection into a SqlErrorCollection, starting at the specified index.

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

參數

array
SqlError[]

要複製元素到其中的 SqlErrorCollectionThe SqlErrorCollection to copy the elements into.

index
Int32

要開始複製到 array 參數中的索引。The index from which to start copying into the array parameter.

例外狀況

index 以及 SqlErrorCollection 集合中項目數的總和大於 SqlErrorCollection 的長度。The sum of index and the number of elements in the SqlErrorCollection collection is greater than the length of the SqlErrorCollection.

arraynullThe array is null.

indexarray 無效。The index is not valid for array.

另請參閱

適用於