TX Text Control .NET Server

Selection Constructor

Constructor|Introduced in 22.0
Namespace
TXTextControl.Web
Package
TXTextControl.Web as TXTextControl.Web.DocumentEditor.dll from nuget.org, the private NuGet feed or Text Control Offline Packages

Description

Creates a new instance of the Web.Selection class.

Syntax

Selection()

Creates an empty Selection object with all properties set to their default values.

public Selection();

Selection(int, int)

Creates an instance of the Web.Selection class with the specified start value and length.

public Selection(int start, int length);
ParameterDescription
start

Specifies the selection's start position.

length

Specifies the number of selected characters.

Examples

The following example creates a Selection instance and verifies that it is ready for the surrounding document workflow.

TXTextControl.Web.Selection selection = new();
Console.WriteLine("Selection is ready.");