TextSpan Struct

TextSpan structure

Represents the text span.

public struct TextSpan : IComparable<TextSpan>, IEquatable<TextSpan>

Constructors

NameDescription
TextSpan(int, int)Create the TextSpan

Properties

NameDescription
End { get; }Get the End index.
Length { get; }Get the length.
Start { get; }Get the Start index.

Methods

NameDescription
static Combine(TextSpan, TextSpan)Combines the text spans
static Create(int, int)Create the TextSpan
static CreateEmpty()Create the empty text span.
static CreateEmpty(int)Create empty TextSpan from start position.
static CreateFromStartEnd(int, int)Create the TextSpan
CompareTo(TextSpan)Compare with other TextSpan
override Equals(object)Compare with other object
Equals(TextSpan)Compare with other TextSpan
override GetHashCode()Get the HashCode
IsEmpty()Return true if length ==0.
override ToString()Get ToString() override
operator ==
operator !=

See Also