using System;
using System.Threading.Tasks;
public class Example
{
char[] xyz = { 'M', 'N' , 'O' , 'P' };
public System.Collections.IEnumerator GetEnumerator()
foreach(char ch in xyz)
yield return ch;
}
public class Program
public static void Main(string[] args)
Example mc = new Example();
foreach(char ch in mc)
Console.Write(ch + " ");