ITrackingSpan.GetText Method

Maps the tracking span to the specified snapshot of its text buffer and gets the text it designates.

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

Syntax

'Declaration
Function GetText ( _
    snapshot As ITextSnapshot _
) As String
string GetText(
    ITextSnapshot snapshot
)
String^ GetText(
    ITextSnapshot^ snapshot
)
abstract GetText : 
        snapshot:ITextSnapshot -> string
function GetText(
    snapshot : ITextSnapshot
) : String

Parameters

Return Value

Type: String
The contents of the tracking span in the specified text snapshot.

Exceptions

Exception Condition
ArgumentNullException

snapshot is nulla null reference (Nothing in Visual Basic).

ArgumentException

snapshot is not a snapshot of TextBuffer.

.NET Framework Security

See Also

Reference

ITrackingSpan Interface

Microsoft.VisualStudio.Text Namespace