76
C# String GetEnumerator()
The C# GetEnumerator() method is used to convert string object into char enumerator. It returns instance of CharEnumerator. So, you can iterate string through loop.
Signature
Parameter
It does not take any argument.
Return
It returns System.CharEnumerator.
C# String GetEnumerator() Method Example
Output:
H e l l o C #
Next TopicC# String GetHashCode()