using System.Collections.Generic;internal class Program{ private static List<Animals> animalList = new List<Animals>(); public class Animals { public string Name { get; set; } public int Amount { get; set; } public Animals(string Name, int Amount) { this.Name = Name; this.Amount = Amount; } } public static void insertData(string animal, int amount) { animalList.Add(new Animals(animal, amount)); } private static void Main(string[] args) { insertData("Dog", 4); insertData("Cat", 12); foreach (Animals animals in animalList) { Console.WriteLine(animals.Name); } }}