Imports System
Imports System.Collections
Imports Microsoft.VisualBasic
Module GetEnumerator
Sub Main()
EnumerateAndDisplay("Test Case")
End Sub 'Main
Sub EnumerateAndDisplay(Operand As String)
Dim OperandEnum As IEnumerator = Operand.GetEnumerator()
Dim CharCount As Integer = 0
While OperandEnum.MoveNext()
CharCount += 1
Console.Write(" ""{0}"" ", OperandEnum.Current)
End While
Console.WriteLine(vbCrLf & " Character count: {0}", CharCount)
End Sub
End Module