System.Collections.Generic.IEnumerable<T> Interface

public interface IEnumerable<T>: IEnumerable

Base Types

This type implements IEnumerable.

Assembly

mscorlib

Library

BCL

Summary

Implemented by generic classes that support a simple iteration over instances of the collection.

Description

[Note: IEnumerable<T> contains the System.Collections.Generic.IEnumerable<T>.GetEnumerator method. The consumer of an object should call this method to obtain an enumerator for simple iteration over an instance of a collection. Implement this interface to support the foreach semantics of C#.

]

See Also

System.Collections.Generic Namespace

Members

IEnumerable<T> Methods

IEnumerable<T>.GetEnumerator Method


IEnumerable<T>.GetEnumerator Method

IEnumerator<T> GetEnumerator()

Summary

Returns a IEnumerator<T> that can be used for simple iteration over a collection.

Return Value

A IEnumerator<T> that can be used for simple iteration over a collection.

Description

[Behaviors: As described above.]

[Usage: For a detailed description regarding the use of an enumerator, see IEnumerator<T>.]

See Also

System.Collections.Generic.IEnumerable<T> Interface, System.Collections.Generic Namespace