Share via


BorrowedList<TElement>.CopyTo Method

Definition

Copies the specified range of the BorrowedList<TElement> into buffer starting at the targetIndex position.

public void CopyTo(System.Collections.Generic.IList<TElement> buffer, int sourceIndex, int targetIndex, int length);
member this.CopyTo : System.Collections.Generic.IList<'Element> * int * int * int -> unit
Public Sub CopyTo (buffer As IList(Of TElement), sourceIndex As Integer, targetIndex As Integer, length As Integer)

Parameters

buffer
IList<TElement>

The list to copy to.

sourceIndex
Int32

The starting index on the source BorrowedList<TElement>.

targetIndex
Int32

The starting index of buffer.

length
Int32

The number of elements to copy.

Remarks

This method is safe to use when buffer is this instance of BorrowedList<TElement>, even when the source and destination ranges overlap.

Applies to