TX Text Control .NET for WPF

GetEnumerator Method

Method|Introduced in 16.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

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

Syntax

public TextPartCollection.TextPartEnumerator GetEnumerator();

Return Value

The return value is an IEnumerator that represents the collection.

Examples

The following example works with text parts in the current document by using TextPartCollection.GetEnumerator.

TextPartCollection textPartCollection = textControl.TextParts;

IEnumerator enumerator = textPartCollection.GetEnumerator();

while (enumerator.MoveNext())
{
    object item = (object)enumerator.Current;
    Console.WriteLine(item);
}