 Enumerators are typically obtained by calling the method of an object implementing the interface.Container classes typically implement this interface.However, the foreach statement in C# can operate on any object providing such a method, even if it doesn't implement .