# IEnumerable<T> Methods

**.NET Framework 3.5**

The IEnumerable<T> type exposes the following members.

Name | Description | |
---|---|---|

Aggregate | Applies an accumulator function over a sequence. (Defined by Enumerable.) | |

All | Determines whether all elements of a sequence satisfy a condition. (Defined by Enumerable.) | |

Ancestors | Overloaded. Returns a collection of elements that contains the ancestors of every node in the source collection. | |

Any | Overloaded. Determines whether any element of a sequence exists or satisfies a condition. | |

AsEnumerable | Returns the input typed as IEnumerable<T>. (Defined by Enumerable.) | |

AsQueryable | Overloaded. Converts an IEnumerable or generic IEnumerable<T> to an IQueryable or generic IQueryable<T>. | |

Average | Overloaded. Computes the average of a sequence of numeric values. | |

Cast | Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) | |

Concat | Concatenates two sequences. (Defined by Enumerable.) | |

Contains | Overloaded. Determines whether a sequence contains a specified element. | |

CopyToDataTable | Overloaded. Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object. | |

Count | Overloaded. Returns the number of elements in a sequence. | |

DefaultIfEmpty | Overloaded. Returns the elements of an IEnumerable<T>, or a default valued singleton collection if the sequence is empty. | |

DescendantNodes | Returns a collection of the descendant nodes of every document and element in the source collection. (Defined by Extensions.) | |

Descendants | Overloaded. Returns a collection of elements that contains the descendant elements of every element and document in the source collection. | |

Distinct | Overloaded. Returns distinct elements from a sequence. | |

ElementAt | Returns the element at a specified index in a sequence. (Defined by Enumerable.) | |

ElementAtOrDefault | Returns the element at a specified index in a sequence or a default value if the index is out of range. (Defined by Enumerable.) | |

Elements | Overloaded. Returns a collection of the child elements of every element and document in the source collection. | |

Except | Overloaded. Produces the set difference of two sequences. | |

First | Overloaded. Returns the first element of a sequence. | |

FirstOrDefault | Overloaded. Returns the first element of a sequence, or a default value if no element is found. | |

InDocumentOrder | Returns a collection of nodes that contains all nodes in the source collection, sorted in document order. (Defined by Extensions.) | |

Intersect | Overloaded. Produces the set intersection of two sequences. | |

Last | Overloaded. Returns the last element of a sequence. | |

LastOrDefault | Overloaded. Returns the last element of a sequence, or a default value if no element is found. | |

LongCount | Overloaded. Returns an Int64 that represents the number of elements in a sequence. | |

Max | Overloaded. Returns the maximum value in a sequence of values. | |

Min | Overloaded. Returns the minimum value in a sequence of values. | |

Nodes | Returns a collection of the child nodes of every document and element in the source collection. (Defined by Extensions.) | |

OfType | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) | |

Remove | Removes every node in the source collection from its parent node. (Defined by Extensions.) | |

Reverse | Inverts the order of the elements in a sequence. (Defined by Enumerable.) | |

SequenceEqual | Overloaded. Determines whether two sequences are equal according to an equality comparer. | |

Single | Overloaded. Returns a single, specific element of a sequence of values. | |

SingleOrDefault | Overloaded. Returns a single, specific element of a sequence of values, or a default value if no such element is found. | |

Skip | Bypasses a specified number of elements in a sequence and then returns the remaining elements. (Defined by Enumerable.) | |

SkipWhile | Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. | |

Sum | Overloaded. Computes the sum of a sequence of numeric values. | |

Take | Returns a specified number of contiguous elements from the start of a sequence. (Defined by Enumerable.) | |

TakeWhile | Overloaded. Returns elements from a sequence as long as a specified condition is true, and then skips the remaining elements. | |

ToArray | Creates an array from a IEnumerable<T>. (Defined by Enumerable.) | |

ToList | Creates a List<T> from an IEnumerable<T>. (Defined by Enumerable.) | |

Union | Overloaded. Produces the set union of two sequences. | |

Where | Overloaded. Filters a sequence of values based on a predicate. |

## Community Additions

ADD
Show: