Enumerator Reset : IEnumerator « Collections « VB.Net Tutorial






Imports System.Collections


public class Test
   public Shared Sub Main
        Dim StringArray() As String = {"This", "is", "a", "test"}
        

        Array.Reverse(StringArray)
            
        Dim E As IEnumerator = StringArray.GetEnumerator()
    
        While (E.MoveNext())
          Console.WriteLine(E.Current())
        End While
    
        E.Reset()
    
        While (E.MoveNext())
          Console.WriteLine(E.Current())
        End While

   End Sub
End class
test
a
is
This
test
a
is
This








8.24.IEnumerator
8.24.1.Iterator
8.24.2.Iterator with While End
8.24.3.Get Enumerator from Collection for custom object
8.24.4.Loop through an array using the Enumerator
8.24.5.Enumerator Reset