What is CharEnumerator in C#?

 Posted by Raja on 2/15/2010 | Category: C# Interview questions | Views: 4990

CharEnumerator is an object in C# that can be used to enumerate through all the characters of a string. Below is the sample to do that

string str = "my name";

CharEnumerator chs = str.GetEnumerator();

Moderator: please do not move this to Code section, this is a typical interview question that was asked :)

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response