IEnumerable Interface

July 28, 2014

Exposes the enumerator, which supports a simple iteration over a non-generic collection.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

public interface IEnumerable

The IEnumerable type exposes the following members.

  NameDescription
Public methodGetEnumeratorReturns an enumerator that iterates through a collection.
Top

  NameDescription
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

For the generic version of this interface see System.Collections.Generic.IEnumerable<T>.

Notes to Implementers

IEnumerable must be implemented to support the foreach semantics of Microsoft Visual Basic. COM classes that allow enumerators also implement this interface.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft