将文本范围复制到字符数组。
命名空间: 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 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
ArgumentOutOfRangeException | sourceIndex 大于零的小于或大于快照的长度,或者 count 小于零,或 sourceIndex 以及 count 大于快照的长度,或者 destinationIndex 小于零,或 destinationIndex 以及 count 大于 destination的长度。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。