SnapshotSpan Structure
An immutable text span in a particular text snapshot.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
| Name | Description | |
|---|---|---|
![]() | SnapshotSpan(ITextSnapshot, Int32, Int32) | Initializes a new instance of a SnapshotSpan with the specified snapshot, start point, and length. |
![]() | SnapshotSpan(ITextSnapshot, Span) | Initializes a new instance of a SnapshotSpan with the specified snapshot and span. |
![]() | SnapshotSpan(SnapshotPoint, Int32) | Initializes a new instance of a SnapshotSpan from an existing SnapshotPoint and a specified length. |
![]() | SnapshotSpan(SnapshotPoint, SnapshotPoint) | Initializes a new instance of a SnapshotSpan from two SnapshotPoint objects. |
| Name | Description | |
|---|---|---|
![]() | End | Gets the end of the snapshot span. |
![]() | IsEmpty | Determines whether or not this span is empty. |
![]() | Length | Gets the length of the span, which is always non-negative. |
![]() | Snapshot | The ITextSnapshot to which this snapshot span refers. |
![]() | Span | Gets the span covered by the snapshot span. |
![]() | Start | Gets the starting index of the snapshot span. |
| Name | Description | |
|---|---|---|
![]() | Contains(Int32) | Determines whether the position lies within the span. |
![]() | Contains(SnapshotPoint) | Determines whether the specified SnapshotPoint lies within the span. |
![]() | Contains(SnapshotSpan) | Determines whether the snapshot span falls completely within this span. |
![]() | Contains(Span) | Determines whether the specified span falls completely within this span. |
![]() | Equals(Object) | Determines whether two snapshot spans are the same.(Overrides ValueType.Equals(Object).) |
![]() | GetHashCode() | Serves as a hash function for this type.(Overrides ValueType.GetHashCode().) |
![]() | GetText() | The text contained by this snapshot span. |
![]() | GetType() | (Inherited from Object.) |
![]() | Intersection(SnapshotSpan) | Calculates the intersection with the given SnapshotSpan. |
![]() | Intersection(Span) | Calculates the intersection with the given span. |
![]() | IntersectsWith(SnapshotSpan) | Determines whether the specified snapshot span intersects this span. |
![]() | IntersectsWith(Span) | Determines whether the specified span intersects this span. |
![]() | Overlap(SnapshotSpan) | Gets the overlap with the given SnapshotSpan. |
![]() | Overlap(Span) | Getss the overlap with the given span. |
![]() | OverlapsWith(SnapshotSpan) | Determines whether another span overlaps this span. |
![]() | OverlapsWith(Span) | Determines whether simpleSpan overlaps this span. |
![]() | ToString() | Converts this snapshot span to a string.(Overrides ValueType.ToString().) |
![]() | TranslateTo(ITextSnapshot, SpanTrackingMode) | Translates this snapshot span to a different snapshot of the same ITextBuffer. |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality(SnapshotSpan, SnapshotSpan) | Determines whether two snapshot spans are the same. |
![]() ![]() | Implicit(SnapshotSpan to Span) | Implicitly converts a snapshot span to a span. |
![]() ![]() | Inequality(SnapshotSpan, SnapshotSpan) | Determines whether two snapshot spans are different. |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



