New to Telerik UI for WinForms? Start a free 30-day trial

Represents a text interval with a zero-based start position and an exclusive end position.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.SpellChecker.dll

Syntax:

C#
public class TextRange

Inheritance: objectTextRange

Constructors

Creates a text interval with the specified boundaries.

C#
public TextRange(int startPosition, int endPosition)
Parameters:startPositionint

The zero-based index where the interval begins.

endPositionint

The exclusive index where the interval ends.

Properties

Gets the exclusive index where the interval ends.

C#
public int EndPosition { get; }

Gets the zero-based index where the interval begins.

C#
public int StartPosition { get; }

Methods

Selects this range in the text box, replacing its current selection.

C#
public void AddToSelection(RadTextBox radDocument)
Parameters:radDocumentRadTextBox

The text box whose selection is updated.

Sets the selection of the document to the current text range.

C#
public void SetSelection(RadTextBox radDocument)
Parameters:radDocumentRadTextBox