String.GetEnumerator Method ()
Retrieves an object that can iterate through the individual characters in this string.
Assembly: mscorlib (in mscorlib.dll)
Rather than calling the CharEnumerator object that you then use to enumerate a string, you should instead use your language's iteration construct ( in C#, in C++/CLR, and in Visual Basic). foreach in C#, for each in C++/CLR, and For Each in Visual Basic).method to retrieve a
This method enables you to iterate the individual characters in a string. For example, the Visual Basic For Each and C# foreach statements invoke this method to return a CharEnumerator object that can provide read-only access to the characters in this string instance.
Available since 1.1