IEnumerable Interface
Namespace: System.Collections
Represents a generic collection of objects that can be individually accessed by index.
Remarks
The IEnumerable interface is the root interface of the non-generic collection classes. It provides the fundamental capability to iterate over a collection.
The IEnumerable<T> interface, introduced in .NET Framework version 2.0, inherits from IEnumerable and provides additional functionality for generic collections. For new development, it is recommended to implement the generic IEnumerable<T> interface instead of IEnumerable.
Members
Methods
-
GetEnumerator
IEnumerator GetEnumerator()Returns an enumerator that iterates through the collection.
Implementations
The following classes implement the IEnumerable interface:
System.Collections.ArrayListSystem.Collections.QueueSystem.Collections.StackSystem.Collections.Hashtable- And many others...