string[] fruits = { "apple", "banana", "cherry" }; foreach (string fruit in fruits) { Console.WriteLine(fruit); }
Click Run to execute this code.