ITextSnapshot::GetText Method (Int32, Int32)
Visual Studio 2015
Gets text from the snapshot starting at startIndex and having a length equal to length.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Parameters
- startIndex
-
Type:
System::Int32
The starting index.
- length
-
Type:
System::Int32
The length of text to get.
Return Value
Type: System::String^The string of length length starting at startIndex in the underlying ITextBuffer.
| 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. |
Show: