loading
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections.Generic;

class MainClass {
  public static void Main (string[] args) {
    IList<Animal> animals = new List<Animal>();

    animals.Add(new Animal());
    animals.Add(new Wolf());
    animals.Add(new Fish());
    animals.Add(new Goldfish());
    animals.Add(new OtherAnimal());

    foreach(Animal animal in animals)
    {
      animal.eat();
    }
  }
}