ITextSnapshot::ToCharArray Method (Int32, Int32)

 

Converts a range of text to a character array.

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

array<wchar_t>^ ToCharArray(
	int startIndex,
	int length
)

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.

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.

Return to top
Show: