Skip to main content

EnumerableExtensions Methods

Provides access to extension methods that work with IEnumerable<T> collections.
Name Description
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from System.Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from System.Object.
Flatten<T>(IEnumerable<T>, Func<T, IEnumerable<T>>) static Converts a hierarchical data structure into a flat collection. This method traverses the hierarchy defined by the getItems() function. The function accepts all hierarchy items and returns nested items as a flat collection.
Flatten<T>(IEnumerable<T>, Func<T, Int32, IEnumerable<T>>) static Converts a hierarchical data structure into a flat collection. This method traverses the hierarchy defined by the getItems() function. The function accepts an item in the hierarchy and the hierarchy level, and returns nested items.
ForEach<T>(IEnumerable<T>, Action<T, Int32>) static Iterates through each item in the IEnumerable<T> collection and performs the specified action.
ForEach<T>(IEnumerable<T>, Action<T>) static Iterates through each item in the IEnumerable<T> collection and performs the specified action.
GetHashCode() Serves as the default hash function. Inherited from System.Object.
GetType() Gets the Type of the current instance. Inherited from System.Object.
IsSingle<T>(IEnumerable<T>) static Determines whether the specified IEnumerable<T> collection contains only one element.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from System.Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from System.Object.
ToObservableCollection<T>(IEnumerable<T>) static Converts the IEnumerable<T> collection to the ObservableCollection<T>.
ToReadOnlyCollection<T>(IEnumerable<T>) static Converts the IEnumerable<T> collection to the ReadOnlyCollection<T>.
ToReadOnlyObservableCollection<T>(IEnumerable<T>) static Converts the IEnumerable<T> collection to the ReadOnlyObservableCollection<T>.
ToString() Returns a string that represents the current object. Inherited from System.Object.
Yield<T>(T) static Converts an individual item into an IEnumerable<T> collection that contains this item. If the specified item is null, the method returns the collection that stores null.
YieldIfNotNull<T>(T) static Converts an individual item into an IEnumerable<T> sequence that contains this item. If the specified item is null, the method returns an empty sequence.
See Also