TX Text Control .NET Server

GetEnumerator Method

Method|Introduced in 32.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 FootnoteCollection.FootnoteEnumerator GetEnumerator();

Return Value

The return value is an IEnumerator that represents the collection.

Examples

The following example works with footnotes in the current document by using FootnoteCollection.GetEnumerator.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
FootnoteCollection footnoteCollection = textControl.Footnotes;
footnoteCollection.Add(new Footnote("Source: FY 2026 annual report") { ID = 100 }, false);

IEnumerator enumerator = footnoteCollection.GetEnumerator();

while (enumerator.MoveNext())
{
    Footnote footnote = (Footnote)enumerator.Current;
    Console.WriteLine(footnote);
}