次の方法で共有


ITextSnapshot.ToCharArray Method

Converts a range of text to a character array.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'宣言
Function ToCharArray ( _
    startIndex As Integer, _
    length As Integer _
) As Char()
char[] ToCharArray(
    int startIndex,
    int length
)
array<wchar_t>^ ToCharArray(
    int startIndex, 
    int length
)
abstract ToCharArray : 
        startIndex:int * 
        length:int -> char[] 
function ToCharArray(
    startIndex : int, 
    length : int
) : char[]

Parameters

  • startIndex
    Type: System.Int32
    The starting index of the range of text.

Return Value

Type: array<System.Char[]
The array of characters starting at startIndex in the underlying ITextBuffer and extending to its end.

Exceptions

Exception Condition
ArgumentOutOfRangeException

startIndex is less than zero or greater than the length of the snapshot, or length is less than zero, or startIndex plus length is greater than the length of the snapshot.

.NET Framework Security

See Also

Reference

ITextSnapshot Interface

Microsoft.VisualStudio.Text Namespace