TextRange Class


Text Range Class

An object that is used to identify a range of characters in a FormattedText .
Inheritance Hierarchy
System Object
Autodesk.Revit.DB TextRange

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class TextRange : IDisposable

The TextRange type exposes the following members.

Constructors
Name Description
Public method TextRange Constructs a TextRange with default values for start and length.
Public method TextRange(TextRange) Constructs a copy of the input TextRange object.
Public method TextRange(Int32, Int32) Constructs a TextRange with input start and length.
Top
Properties
Name Description
Public property End The index of the first character after the end of the range
Public property IsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public property Length The length of the range.
Public property Start The start index of a range within the FormattedText .
Top
Methods
Name Description
Public method Dispose Releases all resources used by the TextRange
Public method Equals Determines whether the specified object is equal to the current object.
(Inherited from Object )
Public method GetHashCode Serves as the default hash function.
(Inherited from Object )
Public method GetType Gets the Type of the current instance.
(Inherited from Object )
Public method ToString Returns a string that represents the current object.
(Inherited from Object )
Top
Remarks
A TextRange consists of a start, which is a zero-based index into the text, and a length, which is the number of characters in the range. The length can be zero.
See Also