//************************************** // Name: foreach // Description:lean foreach loop // By: hatem mostafa ahmed // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** using System; public class Program { public static void Main() { String[] strStudent ={"george","john","ali","osama"}; foreach(String student in strStudent) Console.WriteLine(student); String strName ="samir"; char[] ch =strName.ToCharArray(); foreach(char c in ch) Console.WriteLine(c); } }