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 PageCollection.PageEnumerator GetEnumerator();Public Function GetEnumerator() As PageCollection.PageEnumeratorReturn Value
The return value is an IEnumerator that represents the collection.
Examples
The following example works with the laid-out pages of a short report by using PageCollection.GetEnumerator.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
PageCollection pageCollection = textControl.GetPages();
IEnumerator enumerator = pageCollection.GetEnumerator();
while (enumerator.MoveNext())
{
Page page = (Page)enumerator.Current;
Console.WriteLine(page);
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
Dim pageCollection As PageCollection = textControl.GetPages()
Dim enumerator As IEnumerator = pageCollection.GetEnumerator()
While enumerator.MoveNext()
Dim page As Page =
DirectCast(enumerator.Current, Page)
Console.WriteLine(page)
End While