SnapshotSpan::TranslateTo Method (ITextSnapshot^, SpanTrackingMode)
Visual Studio 2015
Translates this snapshot span to a different snapshot of the same ITextBuffer.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
public:
SnapshotSpan TranslateTo(
ITextSnapshot^ targetSnapshot,
SpanTrackingMode spanTrackingMode
)
Parameters
- targetSnapshot
-
Type:
Microsoft.VisualStudio.Text::ITextSnapshot^
The snapshot to which to translate.
- spanTrackingMode
-
Type:
Microsoft.VisualStudio.Text::SpanTrackingMode
The SpanTrackingMode to use in the translation.
| Exception | Condition |
|---|---|
| ArgumentNullException | targetSnapshot is null. |
| ArgumentException | targetSnapshot does not refer to the same ITextBuffer as this snapshot span. |
Show: