Lire en anglais

Partager via


SnapshotSpan.TranslateTo Method

Translates this snapshot span to a different snapshot of the same ITextBuffer.

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

Syntax

public SnapshotSpan TranslateTo(
    ITextSnapshot targetSnapshot,
    SpanTrackingMode spanTrackingMode
)

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotSpan
A new snapshot span.

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentException

targetSnapshot does not refer to the same ITextBuffer as this snapshot span.

.NET Framework Security

See Also

Reference

SnapshotSpan Structure

Microsoft.VisualStudio.Text Namespace