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 MisspelledWordCollection.MisspelledWordEnumerator GetEnumerator();Public Function GetEnumerator() As MisspelledWordCollection.MisspelledWordEnumeratorReturn Value
The return value is an IEnumerator that represents the collection.
Examples
The following example works with misspelled words in the current document by using MisspelledWordCollection.GetEnumerator.
MisspelledWordCollection misspelledWordCollection = textControl.MisspelledWords;
IEnumerator enumerator = misspelledWordCollection.GetEnumerator();
while (enumerator.MoveNext())
{
MisspelledWord misspelledWord = (MisspelledWord)enumerator.Current;
Console.WriteLine(misspelledWord);
}Dim misspelledWordCollection As MisspelledWordCollection = textControl.MisspelledWords
Dim enumerator As IEnumerator = misspelledWordCollection.GetEnumerator()
While enumerator.MoveNext()
Dim misspelledWord As MisspelledWord =
DirectCast(enumerator.Current, MisspelledWord)
Console.WriteLine(misspelledWord)
End While