TX Text Control .NET Server

GetEnumerator Method

Method|Introduced in 26.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Returns an enumerator that can be used to iterate through the collection.

Syntax

public TrackedChangeCollection.TrackedChangeEnumerator GetEnumerator();

Return Value

The return value is an IEnumerator that represents the collection.

Examples

The following example explicitly enumerates revisions and selects the first insertion.

TrackedChangeCollection changes = textControl.TrackedChanges;
IEnumerator enumerator = changes.GetEnumerator();
while (enumerator.MoveNext())
{
    TrackedChange change = (TrackedChange)enumerator.Current;
    if (change.ChangeKind == ChangeKind.InsertedText)
    {
        change.Select();
        break;
    }
}