VirtualSnapshotSpan::TranslateTo Method (ITextSnapshot^, SpanTrackingMode)
Visual Studio 2015
Translates this span to the specified snapshot with the given tracking mode.
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
public:
VirtualSnapshotSpan TranslateTo(
ITextSnapshot^ snapshot,
SpanTrackingMode trackingMode
)
Parameters
- snapshot
-
Type:
Microsoft.VisualStudio.Text::ITextSnapshot^
The target snapshot.
- trackingMode
-
Type:
Microsoft.VisualStudio.Text::SpanTrackingMode
The tracking mode.
Return Value
Type: Microsoft.VisualStudio.Text::VirtualSnapshotSpanThe corresponding VirtualSnapshotSpan in snapshot.
| Exception | Condition |
|---|---|
| ArgumentException | snapshot is for an earlier snapshot. |
See TranslateTo for a description of how VirtualSnapshotPoint translation behaves.
Show: