<PackageReference Include="Newtonsoft.Json" Version="6.0.3" />

Enumerable

static class Enumerable
Provides a set of static (Shared in Visual Basic) methods for querying objects that implement IEnumerable<T>.
public static TSource Aggregate<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, TSource> func)

Applies an accumulator function over a sequence.

public static TAccumulate Aggregate<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func)

Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.

public static TResult Aggregate<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)

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.

public static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Determines whether all elements of a sequence satisfy a condition.

public static bool Any<TSource>(this IEnumerable<TSource> source)

Determines whether a sequence contains any elements.

public static bool Any<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Determines whether any element of a sequence satisfies a condition.

public static IEnumerable<TSource> AsEnumerable<TSource>(IEnumerable<TSource> source)

Returns the input typed as IEnumerable<T>.

public static double Average(this IEnumerable<int> source)

Computes the average of a sequence of nullable Int32 values.

public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector)

Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.

public static double? Average(this IEnumerable<int?> source)

Computes the average of a sequence of Int32 values.

public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector)

Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.

public static double Average(this IEnumerable<long> source)

Computes the average of a sequence of nullable Int64 values.

public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector)

Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.

public static double? Average(this IEnumerable<long?> source)

Computes the average of a sequence of Int64 values.

public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector)

Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.

public static float Average(this IEnumerable<float> source)

Computes the average of a sequence of nullable Single values.

public static float Average<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector)

Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.

public static float? Average(this IEnumerable<float?> source)

Computes the average of a sequence of Single values.

public static float? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector)

Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.

public static double Average(this IEnumerable<double> source)

Computes the average of a sequence of nullable Double values.

public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector)

Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.

public static double? Average(this IEnumerable<double?> source)

Computes the average of a sequence of Double values.

public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)

Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.

public static decimal Average(this IEnumerable<decimal> source)

Computes the average of a sequence of nullable Decimal values.

public static decimal Average<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector)

Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.

public static decimal? Average(this IEnumerable<decimal?> source)

Computes the average of a sequence of Decimal values.

public static decimal? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector)

Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.

public static IEnumerable<TResult> Cast<TResult>(this IEnumerable source)

Converts the elements of an IEnumerable to the specified type.

public static IEnumerable<TSource> Concat<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second)

Concatenates two sequences.

public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource value)

Determines whether a sequence contains a specified element by using the default equality comparer.

public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource value, IEqualityComparer<TSource> comparer)

Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>.

public static int Count<TSource>(this IEnumerable<TSource> source)

Returns the number of elements in a sequence.

public static int Count<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns a number that represents how many elements in the specified sequence satisfy a condition.

public static IEnumerable<TSource> DefaultIfEmpty<TSource>(this IEnumerable<TSource> source)

Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.

public static IEnumerable<TSource> DefaultIfEmpty<TSource>(this IEnumerable<TSource> source, TSource defaultValue)

Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.

public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source)

Returns distinct elements from a sequence by using the default equality comparer to compare values.

public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source, IEqualityComparer<TSource> comparer)

Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values.

public static TSource ElementAt<TSource>(this IEnumerable<TSource> source, int index)

Returns the element at a specified index in a sequence.

public static TSource ElementAtOrDefault<TSource>(this IEnumerable<TSource> source, int index)

Returns the element at a specified index in a sequence or a default value if the index is out of range.

public static IEnumerable<TResult> Empty<TResult>()

Returns an empty IEnumerable<T> that has the specified type argument.

public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second)

Produces the set difference of two sequences by using the default equality comparer to compare values.

public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)

Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values.

public static TSource First<TSource>(this IEnumerable<TSource> source)

Returns the first element of a sequence.

public static TSource First<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns the first element in a sequence that satisfies a specified condition.

public static TSource FirstOrDefault<TSource>(this IEnumerable<TSource> source)

Returns the first element of a sequence, or a default value if the sequence contains no elements.

public static TSource FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.

public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Groups the elements of a sequence according to a specified key selector function.

public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)

Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.

public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)

Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.

public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.

public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector)

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.

public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer)

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.

public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector)

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.

public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer)

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.

public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector)

Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys.

public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey> comparer)

Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys. A specified IEqualityComparer<T> is used to compare keys.

public static IEnumerable<TSource> Intersect<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second)

Produces the set intersection of two sequences by using the default equality comparer to compare values.

public static IEnumerable<TSource> Intersect<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)

Produces the set intersection of two sequences by using the specified IEqualityComparer<T> to compare values.

public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector)

Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.

public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer)

Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. A specified IEqualityComparer<T> is used to compare keys.

public static TSource Last<TSource>(this IEnumerable<TSource> source)

Returns the last element of a sequence.

public static TSource Last<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns the last element of a sequence that satisfies a specified condition.

public static TSource LastOrDefault<TSource>(this IEnumerable<TSource> source)

Returns the last element of a sequence, or a default value if the sequence contains no elements.

public static TSource LastOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.

public static long LongCount<TSource>(this IEnumerable<TSource> source)

Returns an Int64 that represents the total number of elements in a sequence.

public static long LongCount<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns an Int64 that represents how many elements in a sequence satisfy a condition.

public static TSource Max<TSource>(this IEnumerable<TSource> source)

Returns the maximum value in a generic sequence.

public static TResult Max<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)

Invokes a transform function on each element of a generic sequence and returns the maximum resulting value.

public static int? Max(this IEnumerable<int?> source)

Returns the maximum value in a sequence of nullable Int32 values.

public static int? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector)

Invokes a transform function on each element of a sequence and returns the maximum nullable Int32 value.

public static long? Max(this IEnumerable<long?> source)

Returns the maximum value in a sequence of nullable Int64 values.

public static long? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector)

Invokes a transform function on each element of a sequence and returns the maximum nullable Int64 value.

public static float? Max(this IEnumerable<float?> source)

Returns the maximum value in a sequence of nullable Single values.

public static float? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector)

Invokes a transform function on each element of a sequence and returns the maximum nullable Single value.

public static double? Max(this IEnumerable<double?> source)

Returns the maximum value in a sequence of nullable Double values.

public static double? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)

Invokes a transform function on each element of a sequence and returns the maximum nullable Double value.

public static decimal? Max(this IEnumerable<decimal?> source)

Returns the maximum value in a sequence of nullable Decimal values.

public static decimal? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector)

Invokes a transform function on each element of a sequence and returns the maximum nullable Decimal value.

public static TSource Min<TSource>(this IEnumerable<TSource> source)

Returns the minimum value in a generic sequence.

public static TResult Min<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)

Invokes a transform function on each element of a generic sequence and returns the minimum resulting value.

public static int? Min(this IEnumerable<int?> source)

Returns the minimum value in a sequence of nullable Int32 values.

public static int? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector)

Invokes a transform function on each element of a sequence and returns the minimum nullable Int32 value.

public static long? Min(this IEnumerable<long?> source)

Returns the minimum value in a sequence of nullable Int64 values.

public static long? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector)

Invokes a transform function on each element of a sequence and returns the minimum nullable Int64 value.

public static float? Min(this IEnumerable<float?> source)

Returns the minimum value in a sequence of nullable Single values.

public static float? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector)

Invokes a transform function on each element of a sequence and returns the minimum nullable Single value.

public static double? Min(this IEnumerable<double?> source)

Returns the minimum value in a sequence of nullable Double values.

public static double? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)

Invokes a transform function on each element of a sequence and returns the minimum nullable Double value.

public static decimal? Min(this IEnumerable<decimal?> source)

Returns the minimum value in a sequence of nullable Decimal values.

public static decimal? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector)

Invokes a transform function on each element of a sequence and returns the minimum nullable Decimal value.

public static IEnumerable<TResult> OfType<TResult>(this IEnumerable source)

Filters the elements of an IEnumerable based on a specified type.

public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Sorts the elements of a sequence in ascending order according to a key.

public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)

Sorts the elements of a sequence in ascending order by using a specified comparer.

public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Sorts the elements of a sequence in descending order according to a key.

public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)

Sorts the elements of a sequence in descending order by using a specified comparer.

public static IEnumerable<int> Range(int start, int count)

Generates a sequence of integral numbers within a specified range.

public static IEnumerable<TResult> Repeat<TResult>(TResult element, int count)

Generates a sequence that contains one repeated value.

public static IEnumerable<TSource> Reverse<TSource>(this IEnumerable<TSource> source)

Inverts the order of the elements in a sequence.

public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)

Projects each element of a sequence into a new form.

public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, int, TResult> selector)

Projects each element of a sequence into a new form by incorporating the element's index.

public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector)

Projects each element of a sequence to an IEnumerable<T> and flattens the resulting sequences into one sequence.

public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TResult>> selector)

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.

public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)

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.

public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)

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.

public static bool SequenceEqual<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second)

Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type.

public static bool SequenceEqual<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)

Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer<T>.

public static TSource Single<TSource>(this IEnumerable<TSource> source)

Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.

public static TSource Single<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.

public static TSource SingleOrDefault<TSource>(this IEnumerable<TSource> source)

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.

public static TSource SingleOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

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.

public static IEnumerable<TSource> Skip<TSource>(this IEnumerable<TSource> source, int count)

Bypasses a specified number of elements in a sequence and then returns the remaining elements.

public static IEnumerable<TSource> SkipWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

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

public static IEnumerable<TSource> SkipWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate)

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.

public static int Sum(this IEnumerable<int> source)

Computes the sum of a sequence of nullable Int32 values.

public static int Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector)

Computes the sum of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.

public static int? Sum(this IEnumerable<int?> source)

Computes the sum of a sequence of Int32 values.

public static int? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector)

Computes the sum of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.

public static long Sum(this IEnumerable<long> source)

Computes the sum of a sequence of nullable Int64 values.

public static long Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector)

Computes the sum of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.

public static long? Sum(this IEnumerable<long?> source)

Computes the sum of a sequence of Int64 values.

public static long? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector)

Computes the sum of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.

public static float Sum(this IEnumerable<float> source)

Computes the sum of a sequence of nullable Single values.

public static float Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector)

Computes the sum of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.

public static float? Sum(this IEnumerable<float?> source)

Computes the sum of a sequence of Single values.

public static float? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector)

Computes the sum of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.

public static double Sum(this IEnumerable<double> source)

Computes the sum of a sequence of nullable Double values.

public static double Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector)

Computes the sum of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.

public static double? Sum(this IEnumerable<double?> source)

Computes the sum of a sequence of Double values.

public static double? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)

Computes the sum of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.

public static decimal Sum(this IEnumerable<decimal> source)

Computes the sum of a sequence of nullable Decimal values.

public static decimal Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector)

Computes the sum of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.

public static decimal? Sum(this IEnumerable<decimal?> source)

Computes the sum of a sequence of Decimal values.

public static decimal? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector)

Computes the sum of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.

public static IEnumerable<TSource> Take<TSource>(this IEnumerable<TSource> source, int count)

Returns a specified number of contiguous elements from the start of a sequence.

public static IEnumerable<TSource> TakeWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Returns elements from a sequence as long as a specified condition is true.

public static IEnumerable<TSource> TakeWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate)

Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function.

public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.

public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)

Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer.

public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Performs a subsequent ordering of the elements in a sequence in descending order, according to a key.

public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)

Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.

public static TSource[] ToArray<TSource>(this IEnumerable<TSource> source)

Creates an array from an IEnumerable<T>.

public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Creates a Dictionary<T, U> from an IEnumerable<T> according to a specified key selector function.

public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)

Creates a Dictionary<T, U> from an IEnumerable<T> according to a specified key selector function and key comparer.

public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)

Creates a Dictionary<T, U> from an IEnumerable<T> according to specified key selector and element selector functions.

public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)

Creates a Dictionary<T, U> from an IEnumerable<T> according to a specified key selector function, a comparer, and an element selector function.

public static List<TSource> ToList<TSource>(this IEnumerable<TSource> source)

Creates a List<T> from an IEnumerable<T>.

public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)

Creates a Lookup<T, U> from an IEnumerable<T> according to a specified key selector function.

public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)

Creates a Lookup<T, U> from an IEnumerable<T> according to a specified key selector function and a key comparer.

public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)

Creates a Lookup<T, U> from an IEnumerable<T> according to specified key and element selector functions.

public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)

Creates a Lookup<T, U> from an IEnumerable<T> according to a specified key selector function, a comparer and an element selector function.

public static IEnumerable<TSource> Union<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second)

Produces the set union of two sequences by using the default equality comparer.

public static IEnumerable<TSource> Union<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)

Produces the set union of two sequences by using a specified IEqualityComparer<T>.

public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)

Filters a sequence of values based on a predicate.

public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate)

Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.