Поделиться через


ITextSnapshot.CopyTo - метод

Копирует диапазон текста в массив символов.

Пространство имен:  Microsoft.VisualStudio.Text
Сборка:  Microsoft.VisualStudio.Text.Data (в Microsoft.VisualStudio.Text.Data.dll)

Синтаксис

'Декларация
Sub CopyTo ( _
    sourceIndex As Integer, _
    destination As Char(), _
    destinationIndex As Integer, _
    count As Integer _
)
void CopyTo(
    int sourceIndex,
    char[] destination,
    int destinationIndex,
    int count
)
void CopyTo(
    int sourceIndex, 
    array<wchar_t>^ destination, 
    int destinationIndex, 
    int count
)
abstract CopyTo : 
        sourceIndex:int * 
        destination:char[] * 
        destinationIndex:int * 
        count:int -> unit
function CopyTo(
    sourceIndex : int, 
    destination : char[], 
    destinationIndex : int, 
    count : int
)

Параметры

  • sourceIndex
    Тип: Int32

    Начальный индекс в текстовом снимке.

  • destination
    Тип: array<Char[]

    Массив назначения.

  • destinationIndex
    Тип: Int32

    Индекс в целевом массиве, с которого начинается копирование текста.

  • count
    Тип: Int32

    Число копируемых знаков.

Исключения

Исключение Условие
ArgumentNullException

Параметр destination имеет значение nullссылка NULL (Nothing в Visual Basic).

ArgumentOutOfRangeException

sourceIndex меньше нуля или больше длины снимка или count меньше нуля или sourceIndex incremental count больше, чем длина моментальных снимков или destinationIndex меньше нуля или destinationIndex incremental count больше, чем длина destination.

Безопасность платформы .NET Framework

См. также

Ссылки

ITextSnapshot Интерфейс

Microsoft.VisualStudio.Text - пространство имен