GetEnumerator Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Returns an enumerator that can be used to iterate through the collection.
Syntax
public virtual IEnumerator GetEnumerator();Public Overridable Function GetEnumerator() As IEnumeratorReturn Value
The return value is an IEnumerator that represents the collection.
Examples
The following example obtains an enumerator and visits each xml element in the collection.
IEnumerator enumerator = xmlElementCollection.GetEnumerator();
while (enumerator.MoveNext())
{
XmlElement xmlElement = (XmlElement)enumerator.Current;
Console.WriteLine(xmlElement);
}Dim enumerator As IEnumerator = xmlElementCollection.GetEnumerator()
While enumerator.MoveNext()
Dim xmlElement As XmlElement =
DirectCast(enumerator.Current, XmlElement)
Console.WriteLine(xmlElement)
End While