Overloaded. Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.(Defined by Enumerable.)

Overloaded. Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.(Defined by Extensions.)

Overloaded. Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.(Defined by Extensions.)

Overloaded. Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.(Defined by Extensions.)

Overloaded. Groups the elements of a sequence according to a key selector function. The keys are compared by using a comparer and each group's elements are projected by using a specified function.(Defined by Enumerable.)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The keys are compared by using a specified comparer.(Defined by Enumerable.)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function.(Defined by Enumerable.)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function.(Defined by Enumerable.)

Overloaded. Projects each element of a sequence to an IEnumerable<T>, and flattens the resulting sequences into one sequence. The index of each source element is used in the projected form of that element.(Defined by Enumerable.)

Overloaded. Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein.(Defined by Enumerable.)

Overloaded. Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. The index of each source element is used in the intermediate projected form of that element.(Defined by Enumerable.)

Overloaded. Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.(Defined by Enumerable.)

Overloaded. Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.(Defined by Enumerable.)

Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.(Defined by Enumerable.)

To view the .NET Framework source code for this type, see the Reference Source. You can browse through the source code online, download the reference for offline viewing, and step through the sources (including patches and updates) during debugging; see instructions.

IEnumerable<T> contains a single method that you must implement when implementing this interface; GetEnumerator, which returns an IEnumerator<T> object. The returned IEnumerator<T> provides the ability to iterate through the collection by exposing a Current property.

Notes to Implementers:

IEnumerable<T> is included for parity with non-generic collections; implementing IEnumerable<T> allows a generic collection to be passed to a method that expects an IEnumerable object.

The following example demonstrates how to implement the IEnumerable<T> interface and how to use that implementation to create a LINQ query. When you implement IEnumerable<T>, you must also implement IEnumerator<T> or, for C# only, you can use the yield (C# Reference) keyword. Implementing IEnumerator<T> also requires IDisposable to be implemented, which you will see in this example.