public interface IAnimal
{
void doSomeThing();
}
//有好多个IAnimal接口的实现
//这里就不列举了
public class HomeController
{
private readonly IAnimal _animal;
public Dog()
{
IAnimal animal;
animal=_animal;
}
//......
//......
}