skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Span

Represents a document span.

Inheritance
System.Object
Span
Namespace: Telerik.Windows.SyntaxEditor.Core.Text
Assembly: Telerik.Windows.SyntaxEditor.Core.dll

Syntax

public sealed class Span : ValueType

Constructors

Span(Int32, Int32)

Initializes a new instance of the Span struct.

Declaration
public Span(int start, int length)
Parameters
System.Int32 start

System.Int32 length

Fields

Empty

Empty span.

Declaration
public static readonly Span Empty
Field Value
Span

Properties

End

Gets the end of the span.

Declaration
public int End { get; }
Property Value
System.Int32

IsEmpty

Gets a value indicating whether the span is empty.

Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean

Length

Gets the length of this span.

Declaration
public int Length { get; }
Property Value
System.Int32

Start

Gets the start of the span.

Declaration
public int Start { get; }
Property Value
System.Int32

Methods

Contains(Int32)

Checks if the given position in contained in the span.

Declaration
public bool Contains(int position)
Parameters
System.Int32 position

Returns
System.Boolean

Contains(Span)

Checks if the given span in contained in this span instance.

Declaration
public bool Contains(Span span)
Parameters
Span span

Returns
System.Boolean

Equals(Object)

Equals implementation.

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

FromBounds(Int32, Int32)

Initializes a new instance of the Span struct from start and end.

Declaration
public static Span FromBounds(int start, int end)
Parameters
System.Int32 start

System.Int32 end

Returns
Span

GetHashCode()

Declaration
public override int GetHashCode()
Returns
System.Int32

Intersection(Span)

Gets the Span that is result from the intersection of the given span parameter instance and this span instance.

Declaration
public Nullable<Span> Intersection(Span span)
Parameters
Span span

Returns
System.Nullable<Span>

IntersectsWith(Span)

Checks if the given span intersects with this span instance.

Declaration
public bool IntersectsWith(Span span)
Parameters
Span span

Returns
System.Boolean

Overlap(Span)

Gets the Span which is a result from the overlap of the given span parameter instance and this span instance.

Declaration
public Nullable<Span> Overlap(Span span)
Parameters
Span span

Returns
System.Nullable<Span>

OverlapsWith(Span)

Checks if the given span overlaps with this span instance.

Declaration
public bool OverlapsWith(Span span)
Parameters
Span span

Returns
System.Boolean

ToString()

Declaration
public override string ToString()
Returns
System.String

Operators

Equality(Span, Span)

Implementation of == operator.

Declaration
public static bool operator ==(Span left, Span right)
Parameters
Span left

Span right

Returns
System.Boolean

Inequality(Span, Span)

Implementation of != operator.

Declaration
public static bool operator !=(Span left, Span right)
Parameters
Span left

Span right

Returns
System.Boolean

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.

OSZAR »