Span Structure

 

Represents a range.

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

public struct Span

NameDescription
System_CAPS_pubmethodSpan(Int32, Int32)

Initializes a new instance of a Span with the given start point and length.

NameDescription
System_CAPS_pubpropertyEnd

Gets the end of the span.

System_CAPS_pubpropertyIsEmpty

Determines whether or not this span is empty.

System_CAPS_pubpropertyLength

Gets the length of the span, which is always non-negative.

System_CAPS_pubpropertyStart

Gets the starting index of the span.

NameDescription
System_CAPS_pubmethodContains(Int32)

Determines whether the position lies within the span.

System_CAPS_pubmethodContains(Span)

Determines whether the specified span falls completely within this span.

System_CAPS_pubmethodEquals(Object)

Determines whether two spans are the same.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodSystem_CAPS_staticFromBounds(Int32, Int32)

Initializes a new instance of a Span with the given start and end positions.

System_CAPS_pubmethodGetHashCode()

Provides a hash function for the type.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIntersection(Span)

Gets the intersection with the given span, or null if there is no intersection.

System_CAPS_pubmethodIntersectsWith(Span)

Determines whether span intersects this span.

System_CAPS_pubmethodOverlap(Span)

Gets the overlap with the specified span.

System_CAPS_pubmethodOverlapsWith(Span)

Determines whether the specified span overlaps this span.

System_CAPS_pubmethodToString()

Provides a string representation of the span.(Overrides ValueType.ToString().)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(Span, Span)

Determines whether two spans are the same.

System_CAPS_puboperatorSystem_CAPS_staticInequality(Span, Span)

Determines whether two spans are different.

This structure represents an immutable integer interval that describes a range of values, from Start to End. It is closed on the left and open on the right: [Start .. End). In the context of an ITextSnapshot it represents a span of text, but the span structure itself is independent of any particular text buffer or snapshot.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: