现在有这样几个类//这个是父类public abstract class Animal
    {
        protected string name;
        public string Name
        {
            get
            {
                return name;
            }
            set { name = value; }
        }
        public Animal()
        {
            name = "the animal with no name";
        }
        public Animal(string newName)
        {
            name = newName;
        }        public void Feed()
        {
            Console.WriteLine("{0} has been fed.", name);
        }
        public abstract void MakeANoise();
    }
然后下面是子类//Cow子类public class Cow : Animal
    {
        public void Milk()
        {
            Console.WriteLine("{0} has been milked.", name);
        }
        public Cow(string newName)
            : base(newName)
        { }
        public override void MakeANoise()
        {
            Console.WriteLine("{0} says 'moo!'", name);
        }
    }//SuperCowpublic class SuperCow:Cow
    {
        public void Fly()
        {
            Console.WriteLine("{0} is flying!", name);
        }
        public SuperCow(string newName) : base(newName) { }        public override void MakeANoise()
        {
            Console.WriteLine("{0} says 'here I come to save the day!'", name);
        }
    }
然后在一个泛型类里面这么写public class Farm<T> : IEnumerable<T>
        where T : Animal
    {
        private List<T> animals = new List<T>();        public List<T> Animals
        {
            get { return animals; }
        }
        public IEnumerable<T> GetEnumerator()
        {
            return animals.GetEnumerator();
        }
        IEnumerator IEnumerable.GetEnumerator()
        {
            return animals.GetEnumerator();
        }
        public void MakeNoises()
        {
            foreach (T animal in animals)
                animal.MakeANoise();
        }        public void FeedTheAnimals()
        {
            foreach (T animal in animals)
                animal.Feed();
        }
        public Farm<Cow> GetCows()
        {
            Farm<Cow> cowFarm = new Farm<Cow>();
            foreach (T animal in animals)
            {
                if (animal is Cow)
                {
                    cowFarm.Animals.Add(animal as Cow);
                }
            }
            return cowFarm;
        }
    }
这都是按照书上写的,但为什么会报这样的错
错误 1 “ConsoleExample.Farm<T>”不会实现接口成员“System.Collections.Generic.IEnumerable<T>.GetEnumerator()”。“ConsoleExample.Farm<T>.GetEnumerator()”或者是静态、非公共的,或者有错误的返回类型。 G:\c#file\ConsoleExample\ConsoleExample\Farm.cs 9 18 ConsoleExample
请问应该怎么解决呢?