C# loop through array of objet

C#
 List<string> names = new List<string>() { "Suresh Dasari", "Rohini Alavala", "Trishika Dasari" };

            foreach (string name in names)

            {

                Console.WriteLine(name);

            }
Source

Also in C#: