다음을 통해 공유


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

‘선언
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

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

See Also

Reference

ITextSnapshot Interface

GetText Overload

Microsoft.VisualStudio.Text Namespace