Skip to content

T_CodeJam_Collections_EnumerableExtensions

andrewvk edited this page Apr 25, 2016 · 14 revisions

EnumerableExtensions Class

[This is preliminary documentation and is subject to change.]

Extensions for IEnumerable(T)

Inheritance Hierarchy

System.Object
  CodeJam.Collections.EnumerableExtensions
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public static class EnumerableExtensions

VB

<ExtensionAttribute>
Public NotInheritable Class EnumerableExtensions

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type EnumerableExtensions =  class end

The EnumerableExtensions type exposes the following members.

Methods

 

Name Description
Public methodStatic member AsArray(T) Casts the specified sequence to array if possible, or creates an array from.
Public methodStatic member AsList(T) Casts the specified sequence to List(T) if possible, or creates a List(T) from.
Public methodStatic member Concat(T)(IEnumerable(T), T) Appends specified element to end of the collection.
Public methodStatic member Concat(T)(IEnumerable(T), T[]) Appends specified elements to end of the collection.
Public methodStatic member DistinctBy(TSource, TKey)(IEnumerable(TSource), Func(TSource, TKey)) Returns a sequence with distinct elements from the input sequence based on the specified key.
Public methodStatic member DistinctBy(TSource, TKey)(IEnumerable(TSource), Func(TSource, TKey), IEqualityComparer(TKey)) Returns a sequence with distinct elements from the input sequence based on the specified key and key comparer.
Public methodStatic member ExceptBy(TSource, TKey)(IEnumerable(TSource), IEnumerable(TSource), Func(TSource, TKey)) Produces the set difference of two sequences by using the specified key to compare values.
Public methodStatic member ExceptBy(TSource, TKey)(IEnumerable(TSource), IEnumerable(TSource), Func(TSource, TKey), IEqualityComparer(TKey)) Produces the set difference of two sequences by using the specified key and IEqualityComparer(T) to compare values.
Public methodStatic member FirstOrDefault(T)(IEnumerable(T), T) Returns first element, or specified defaultValue, if sequence is empty.
Public methodStatic member FirstOrDefault(T)(IEnumerable(T), T, Func(T, Boolean)) Returns the first element of the sequence that satisfies a condition or a specified defaultValue if no such element is found.
Public methodStatic member Flatten(T) Returns a flattened sequence from a graph or hierarchy of elements by using the specified children selector.
Public methodStatic member IntersectBy(TSource, TKey)(IEnumerable(TSource), IEnumerable(TSource), Func(TSource, TKey)) Produces the set intersection of two sequences by using the specified key to compare values.
Public methodStatic member IntersectBy(TSource, TKey)(IEnumerable(TSource), IEnumerable(TSource), Func(TSource, TKey), IEqualityComparer(TKey)) Produces the set intersection of two sequences by using the specified key and IEqualityComparer(T) to compare values.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Byte)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Decimal)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Double)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Int16)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Int32)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Int64)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Byte))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Decimal))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Double))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int16))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int32))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int64))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(SByte))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Single))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt16))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt32))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt64))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, SByte)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, Single)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, UInt16)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, UInt32)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource)(IEnumerable(TSource), Func(TSource, UInt64)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxBy(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue)) Invokes a selector on each element of a source and returns the item with maximum value.
Public methodStatic member MaxBy(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue), IComparer(TValue)) Invokes a selector on each element of a source and returns the item with maximum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Byte), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Decimal), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Double), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Int16), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Int32), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Int64), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Byte)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Decimal)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Double)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int16)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int32)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int64)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(SByte)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Single)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt16)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt32)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt64)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, SByte), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Single), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, UInt16), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, UInt32), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, UInt64), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MaxByOrDefault(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue), TSource) Invokes a selector on each element of a source and returns the item with maximum value.
Public methodStatic member MaxByOrDefault(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue), IComparer(TValue), TSource) Invokes a selector on each element of a source and returns the item with maximum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Byte)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Decimal)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Double)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Int16)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Int32)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Int64)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Byte))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Decimal))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Double))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int16))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int32))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int64))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(SByte))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Single))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt16))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt32))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt64))) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, SByte)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, Single)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, UInt16)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, UInt32)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource)(IEnumerable(TSource), Func(TSource, UInt64)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinBy(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue), IComparer(TValue)) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Byte), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Decimal), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Double), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Int16), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Int32), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Int64), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Byte)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Decimal)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Double)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int16)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int32)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Int64)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(SByte)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(Single)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt16)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt32)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Nullable(UInt64)), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, SByte), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, Single), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, UInt16), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, UInt32), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource)(IEnumerable(TSource), Func(TSource, UInt64), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member MinByOrDefault(TSource, TValue)(IEnumerable(TSource), Func(TSource, TValue), IComparer(TValue), TSource) Invokes a selector on each element of a source and returns the item with minimum value.
Public methodStatic member OrderBy(TSource) Sorts the elements of a sequence in ascending order.
Public methodStatic member OrderByDescending(TSource) Sorts the elements of a sequence in descending order.
Public methodStatic member Page(T) Extracts pageSize elements from a sequence at a particular one-based page number.
Public methodStatic member Prepend(T)(IEnumerable(T), T) Prepends specified element to the collection start.
Public methodStatic member Prepend(T)(IEnumerable(T), T[]) Prepends specified elements to the collection start.
Public methodStatic member Slice(T) Extracts count elements from a sequence at a particular zero-based starting index.
Public methodStatic member Split(T) Splits the input sequence into a sequence of chunks of the specified size.
Public methodStatic member TakeLast(T) Returns a specified number of contiguous elements from the end of a sequence.
Public methodStatic member ToHashSet(T)(IEnumerable(T)) Creates a HashSet(T) from an IEnumerable(T).
Public methodStatic member ToHashSet(T)(IEnumerable(T), IEqualityComparer(T)) Creates a HashSet(T) from an IEnumerable(T) with the specified equality comparer.
Public methodStatic member TopoSort(T)(IEnumerable(T), Func(T, IEnumerable(T))) Performs topological sort on source.
Public methodStatic member TopoSort(T)(IEnumerable(T), Func(T, IEnumerable(T)), IEqualityComparer(T)) Performs topological sort on source.
Public methodStatic member TopoSort(T, TKey)(IEnumerable(T), Func(T, IEnumerable(T)), Func(T, TKey)) Performs topological sort on source.
Public methodStatic member TopoSort(T, TKey)(IEnumerable(T), Func(T, IEnumerable(T)), Func(T, TKey), IEqualityComparer(TKey)) Performs topological sort on source.
Public methodStatic member ToStrings(T) Returns string representations of source items.
Public methodStatic member Union(T) Produces the set union of two sequences by using the default equality comparer.
Public methodStatic member UnionBy(TSource, TKey)(IEnumerable(TSource), IEnumerable(TSource), Func(TSource, TKey)) Produces the set union of two sequences by using the specified key to compare values.
Public methodStatic member UnionBy(TSource, TKey)(IEnumerable(TSource), IEnumerable(TSource), Func(TSource, TKey), IEqualityComparer(TKey)) Produces the set union of two sequences by using the specified key and IEqualityComparer(T) to compare values.
Public methodStatic member WithIndex(T) Associates an index to each element of the source sequence.
  Back to Top

See Also

Reference

CodeJam.Collections Namespace

Clone this wiki locally