Is it a best practice to refactor an Interface method -- extracting a code fragment of a Interface method to create a new wrapping method?
<p>From MSDN, I got an example as follows:</p>

<pre><code>IEnumerator IEnumerable.GetEnumerator()
{
   return (IEnumerator) GetEnumerator();
}

public PeopleEnum GetEnumerator()
{
    return new PeopleEnum(_people);
}
</code></pre>

<p>Why did the author do like this? Is it a best practice?</p>

<p>--------EDIT---------</p>

<p>MSDN article link : <a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx</a></p>

<p>Why didn't the author do as follows:</p>

<pre><code> IEnumerator IEnumerable.GetEnumerator()
 {
        return new PeopleEnum(_people);
 }
</code></pre>

<p>I tried,  it still works.</p>

<p>======= SECOND EDIT ==========</p>

<pre><code>using System;
using System.Collections;

namespace MyEnumerableEnumerator
{
    class Person
    {
        public Person(string name, int age)
        {
            Name = name;
            Age = age;
        }

        public string Name { get; set; }
        public int Age { get; set; }
    }

    class PeopleEnumerator : IEnumerator
    {
        int Position { get; set; }
        Person[] People { get; set; }
        int Length { get; set; }

        public PeopleEnumerator(Person[] people)
        {
            People = people;
            Position = -1;
            Length = people.Length;
        }

        public bool MoveNext()
        {
            Position++;
            return Position &lt; Length;
        }

        public void Reset()
        {
            Position = -1;
        }

        public object Current
        {
            get
            {
                try
                {
                    return People[Position];
                }
                catch (IndexOutOfRangeException)
                {
                    throw new InvalidOperationException();
                }
            }
        }
    }

    class People : IEnumerable
    {
        Person[] Persons { get; set; }

        public People(Person[] people)
        {
            Persons = new Person[people.Length];

            for (int x = 0; x &lt; people.Length; x++)
                Persons[x] = people[x];
        }

        //public IEnumerator GetEnumerator()
        //{
        //    return new PeopleEnumerator(Persons);
        //}

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        private IEnumerator GetEnumerator()
        {
            return new PeopleEnumerator(Persons);
        }
    }
    class Program
    {
        static void Main(string[] args)
        {

            Person[] persons = { new Person("Mark", 1), new Person("Siva", 2) };

            People people = new People(persons);

            foreach (Person person in people)
            {
                Console.WriteLine("Name: {0}, Age: {1}", person.Name, person.Age);
            }

        }
    }
}
</code></pre>
