The C# Reference in the Visual Studio 2010 online documentation describes the foreach statement as:

The foreach statement repeats a group of embedded statements for each element in an array or an object collection that implements the System.Collections. IEnumerable or System.Collections.Generic.IEnumerable<T> interface.

If that is indeed the case, this should not compile because neither version of IEnumerable is implemented.

using System;

namespace CSharpForEach
{
    class MyThings
    {
        public readonly int[] Items = { 1, 2, 3, 4 };
        public WhereInThings GetEnumerator()
            { return new WhereInThings(this); }
        public int Count()
            { return Items.Length; }
    }

    class WhereInThings
    {
        public WhereInThings(MyThings things)
            { this.things = things; }

        private int index = -1;
        private readonly MyThings things;
        public int Current
            { get { return things.Items[index]; } }

        public bool MoveNext()
            { return things.Count() > ++index; }
    };

    class Program
    {
        static void Main()
        {
            foreach (var thing in new MyThings())
                Console.WriteLine(thing);
            Console.ReadLine();
        }
    }
}

However, not only does it compile, but it executes just fine.

It does so because the C# compiler (at least at version 4.0.30319.1) implements foreach using duck typing, which is mildly surprising. Perhaps the Visual Studio 2010 online documentation is not the definitive source of the C# specification.