ITextSnapshot.CopyTo(Int32, Char[], Int32, Int32) Method

Definition

Copies a range of text to a character array.

public:
 void CopyTo(int sourceIndex, cli::array <char> ^ destination, int destinationIndex, int count);
public:
 void CopyTo(int sourceIndex, Platform::Array <char16> ^ destination, int destinationIndex, int count);
void CopyTo(int sourceIndex, std::Array <char> const & destination, int destinationIndex, int count);
public void CopyTo (int sourceIndex, char[] destination, int destinationIndex, int count);
abstract member CopyTo : int * char[] * int * int -> unit
Public Sub CopyTo (sourceIndex As Integer, destination As Char(), destinationIndex As Integer, count As Integer)

Parameters

sourceIndex
Int32

The starting index in the text snapshot.

destination
Char[]

The destination array.

destinationIndex
Int32

The index in the destination array at which to start copying the text.

count
Int32

The number of characters to copy.

Exceptions

sourceIndex is less than zero or greater than the length of the snapshot, or count is less than zero, or sourceIndex + count is greater than the length of the snapshot, or destinationIndex is less than zero, or destinationIndex plus count is greater than the length of destination.

destination is null.

Applies to