using System.Collections.Generic;
public static void Main()
var animals = new List<Animal>();
Console.WriteLine("Enter animals (Type 'exit' for stop):");
string line = Console.ReadLine();
Console.Write("Enter animal name: ");
string animalName = Console.ReadLine();
Console.Write("Enter animal sound: ");
string animalSound = Console.ReadLine();
animals.Add(new Animal(animalName,animalSound));
Console.Write("Do you want to add another animal (Y/N)");
string answer = Console.ReadLine();
foreach(var animal in animals)
public Animal(string name, string sound)
var song = $@"Old MACDONALD had a farm
And on his farm he had a {_name}
With a {_sound} {_sound} here
And a {_sound} {_sound} there
Here a {_sound}, there a {_sound}
Everywhere a {_sound} {_sound}