using System; public class Test { public static void Main() { char[] b=new char[]{'X','0','X'}; String []a=new String[]{"1","2","3"}; long []l=new long[]{123l,11l,1l}; foreach(char x in b )Console.WriteLine(x); // Array foreach(String s in a)Console.WriteLine(">> "+s); // Array // foreach(int p in a) Console.WriteLine(">> "+p); //Error foreach(byte p in a[0]) Console.WriteLine(">> "+p); //string check foreach(int p in l) Console.WriteLine(">> "+p); // Cast } }