As the error says, you need an explicit cast:
animals.Add( (Animal) new_animal);
new_animal
is of type object
. So, new_animal
could be just about anything. The compiler needs you to explicitly tell it to take the dangerous step of assuming it's of type Animal
. It will not make that assumption on its own because it cannot guarantee the conversion will work.