Share via


ITextStructureNavigator.GetSpanOfPreviousSibling Method

Gets the span of the previous sibling syntactic element of the specified snapshot span.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Function GetSpanOfPreviousSibling ( _
    activeSpan As SnapshotSpan _
) As SnapshotSpan
SnapshotSpan GetSpanOfPreviousSibling(
    SnapshotSpan activeSpan
)
SnapshotSpan GetSpanOfPreviousSibling(
    SnapshotSpan activeSpan
)
abstract GetSpanOfPreviousSibling : 
        activeSpan:SnapshotSpan -> SnapshotSpan
function GetSpanOfPreviousSibling(
    activeSpan : SnapshotSpan
) : SnapshotSpan

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotSpan
A SnapshotSpan that represents the previous sibling syntactic element.

Remarks

If the specified span has zero length, then the behavior is the same as that of GetSpanOfEnclosing.

If the specified snapshot span covers multiple syntactic elements, then this method returns the span of the previous element.

If the specified snapshot span covers a syntactic element that does not have a sibling element, then the behavior is the same as that of GetSpanOfEnclosing.

.NET Framework Security

See Also

Reference

ITextStructureNavigator Interface

Microsoft.VisualStudio.Text.Operations Namespace