Javatpoint Logo
Javatpoint Logo

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
#




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA