ITextSnapshot.GetText Method (Int32, Int32)
Gets text from the snapshot starting at startIndex and having a length equal to length.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaración
Function GetText ( _
startIndex As Integer, _
length As Integer _
) As String
string GetText(
int startIndex,
int length
)
String^ GetText(
int startIndex,
int length
)
abstract GetText :
startIndex:int *
length:int -> string
function GetText(
startIndex : int,
length : int
) : String
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.
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.