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 TextPartCollection.TextPartEnumerator GetEnumerator();Public Function GetEnumerator() As TextPartCollection.TextPartEnumeratorReturn 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);
}Dim textPartCollection As TextPartCollection = textControl.TextParts
Dim enumerator As IEnumerator = textPartCollection.GetEnumerator()
While enumerator.MoveNext()
Dim item As Object =
DirectCast(enumerator.Current, Object)
Console.WriteLine(item)
End While