// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*============================================================ ** ** Interface: IEnumerable ** ** ** ** ** Purpose: Interface for classes providing IEnumerators ** ** ===========================================================*/ namespace System.Collections { using System; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; // Implement this interface if you need to support VB's foreach semantics. // Also, COM classes that support an enumerator will also implement this interface. [Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")] public interface IEnumerable { // Interfaces are not serializable // Returns an IEnumerator for this enumerable Object. The enumerator provides // a simple way to access all the contents of a collection. [Pure] [DispId(-4)] IEnumerator GetEnumerator(); } }