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.
- length
Type: System.Int32
The length of the 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.