GetEnumerator Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Returns an enumerator that can be used to iterate through the collection.
Syntax
public TrackedChangeCollection.TrackedChangeEnumerator GetEnumerator();Public Function GetEnumerator() As TrackedChangeCollection.TrackedChangeEnumeratorReturn 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;
}
}Dim changes As TrackedChangeCollection = textControl.TrackedChanges
Dim enumerator As IEnumerator = changes.GetEnumerator()
While enumerator.MoveNext()
Dim change As TrackedChange = DirectCast(enumerator.Current, TrackedChange)
If change.ChangeKind = ChangeKind.InsertedText Then
change.Select()
Exit While
End If
End While