Click or drag to resize
MoreEnumerable Class
Provides a set of static methods for querying objects that implement IEnumerable<T>. The actual methods are implemented in files reflecting the method name.
Inheritance Hierarchy
System.Object
  MoreLinq.MoreEnumerable

Namespace: MoreLinq
Assembly: MoreLinq (in MoreLinq.dll) Version: 1.4.18916.0 (1.4.18916.839)
Syntax
public static class MoreEnumerable

The MoreEnumerable type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAcquire<TSource>
Ensures that a source sequence of IDisposable objects are all acquired successfully. If the acquisition of any one IDisposable fails then those successfully acquired till that point are disposed.
Public methodStatic memberAssertCount<TSource>(IEnumerable<TSource>, Int32)
Asserts that a source sequence contains a given count of elements.
Public methodStatic memberAssertCount<TSource>(IEnumerable<TSource>, Int32, Func<Int32, Int32, Exception>)
Asserts that a source sequence contains a given count of elements. A parameter specifies the exception to be thrown.
Public methodStatic memberBatch<TSource>(IEnumerable<TSource>, Int32)
Batches the source sequence into sized buckets.
Public methodStatic memberBatch<TSource, TResult>(IEnumerable<TSource>, Int32, Func<IEnumerable<TSource>, TResult>)
Batches the source sequence into sized buckets and applies a projection to each bucket.
Public methodStatic memberConcat<T>(IEnumerable<T>, T)
Returns a sequence consisting of the head elements and the given tail element.
Public methodStatic memberConcat<T>(T, IEnumerable<T>)
Returns a sequence consisting of the head element and the given tail elements.
Public methodStatic memberConsume<T>
Completely consumes the given sequence. This method uses immediate execution, and doesn't store any data during execution.
Public methodStatic memberDistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
Returns all distinct elements of the given source, where "distinctness" is determined via a projection and the default equality comparer for the projected type.
Public methodStatic memberDistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)
Returns all distinct elements of the given source, where "distinctness" is determined via a projection and the specified comparer for the projected type.
Public methodStatic memberCode exampleEquiZip<TFirst, TSecond, TResult>
Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences.
Public methodStatic memberExceptBy<TSource, TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource, TKey>)
Returns the set of elements in the first sequence which aren't in the second sequence, according to a given key selector.
Public methodStatic memberExceptBy<TSource, TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)
Returns the set of elements in the first sequence which aren't in the second sequence, according to a given key selector.
Public methodStatic memberFold<T, TResult>(IEnumerable<T>, Func<T, TResult>)
Returns the result of applying a function to a sequence of 1 element.
Public methodStatic memberFold<T, TResult>(IEnumerable<T>, Func<T, T, TResult>)
Returns the result of applying a function to a sequence of 2 elements.
Public methodStatic memberFold<T, TResult>(IEnumerable<T>, Func<T, T, T, TResult>)
Returns the result of applying a function to a sequence of 3 elements.
Public methodStatic memberFold<T, TResult>(IEnumerable<T>, Func<T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 4 elements.
Public methodStatic memberForEach<T>(IEnumerable<T>, Action<T>)
Immediately executes the given action on each element in the source sequence.
Public methodStatic memberForEach<T>(IEnumerable<T>, Action<T, Int32>)
Immediately executes the given action on each element in the source sequence. Each element's index is used in the logic of the action.
Public methodStatic memberCode exampleGenerate<TResult>
Returns a sequence of values consecutively generated by a generator function.
Public methodStatic memberGenerateByIndex<TResult>
Returns a sequence of values based on indexes.
Public methodStatic memberGroupAdjacent<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
Groups the adjacent elements of a sequence according to a specified key selector function.
Public methodStatic memberGroupAdjacent<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)
Groups the adjacent elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.
Public methodStatic memberGroupAdjacent<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>)
Groups the adjacent elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
Public methodStatic memberGroupAdjacent<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, IEqualityComparer<TKey>)
Groups the adjacent elements of a sequence according to a specified key selector function. The keys are compared by using a comparer and each group's elements are projected by using a specified function.
Public methodStatic memberIndex<TSource>(IEnumerable<TSource>)
Public methodStatic memberIndex<TSource>(IEnumerable<TSource>, Int32)
Returns a sequence of KeyValuePair< TKey, TValue> where the key is the index of the value in the source sequence. An additional parameter specifies the starting index.
Public methodStatic memberMaxBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
Returns the maximal element of the given sequence, based on the given projection.
Public methodStatic memberMaxBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IComparer<TKey>)
Returns the maximal element of the given sequence, based on the given projection and the specified comparer for projected values.
Public methodStatic memberMinBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
Returns the minimal element of the given sequence, based on the given projection.
Public methodStatic memberMinBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IComparer<TKey>)
Returns the minimal element of the given sequence, based on the given projection and the specified comparer for projected values.
Public methodStatic memberOrderedMerge<T>(IEnumerable<T>, IEnumerable<T>)
Merges two ordered sequences into one. Where the elements equal in both sequences, the element from the first sequence is returned in the resulting sequence.
Public methodStatic memberOrderedMerge<T>(IEnumerable<T>, IEnumerable<T>, IComparer<T>)
Merges two ordered sequences into one with an additional parameter specifying how to compare the elements of the sequences. Where the elements equal in both sequences, the element from the first sequence is returned in the resulting sequence.
Public methodStatic memberOrderedMerge<T, TKey>(IEnumerable<T>, IEnumerable<T>, Func<T, TKey>)
Merges two ordered sequences into one with an additional parameter specifying the element key by which the sequences are ordered. Where the keys equal in both sequences, the element from the first sequence is returned in the resulting sequence.
Public methodStatic memberOrderedMerge<T, TKey, TResult>(IEnumerable<T>, IEnumerable<T>, Func<T, TKey>, Func<T, TResult>, Func<T, TResult>, Func<T, T, TResult>)
Merges two ordered sequences into one. Additional parameters specify the element key by which the sequences are ordered, the result when element is found in first sequence but not in the second, the result when element is found in second sequence but not in the first and the result when elements are found in both sequences.
Public methodStatic memberOrderedMerge<T, TKey, TResult>(IEnumerable<T>, IEnumerable<T>, Func<T, TKey>, Func<T, TResult>, Func<T, TResult>, Func<T, T, TResult>, IComparer<TKey>)
Merges two ordered sequences into one. Additional parameters specify the element key by which the sequences are ordered, the result when element is found in first sequence but not in the second, the result when element is found in second sequence but not in the first, the result when elements are found in both sequences and a method for comparing keys.
Public methodStatic memberOrderedMerge<TFirst, TSecond, TKey, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TKey>, Func<TSecond, TKey>, Func<TFirst, TResult>, Func<TSecond, TResult>, Func<TFirst, TSecond, TResult>)
Merges two heterogeneous sequences ordered by a common key type into a homogeneous one. Additional parameters specify the element key by which the sequences are ordered, the result when element is found in first sequence but not in the second and the result when element is found in second sequence but not in the first, the result when elements are found in both sequences.
Public methodStatic memberOrderedMerge<TFirst, TSecond, TKey, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TKey>, Func<TSecond, TKey>, Func<TFirst, TResult>, Func<TSecond, TResult>, Func<TFirst, TSecond, TResult>, IComparer<TKey>)
Merges two heterogeneous sequences ordered by a common key type into a homogeneous one. Additional parameters specify the element key by which the sequences are ordered, the result when element is found in first sequence but not in the second, the result when element is found in second sequence but not in the first, the result when elements are found in both sequences and a method for comparing keys.
Public methodStatic memberCode examplePad<TSource>(IEnumerable<TSource>, Int32)
Pads a sequence with default values if it is narrower (shorter in length) than a given width.
Public methodStatic memberCode examplePad<TSource>(IEnumerable<TSource>, Int32, Func<Int32, TSource>)
Pads a sequence with a dynamic filler value if it is narrower (shorter in length) than a given width.
Public methodStatic memberCode examplePad<TSource>(IEnumerable<TSource>, Int32, TSource)
Pads a sequence with a given filler value if it is narrower (shorter in length) than a given width.
Public methodStatic memberCode examplePairwise<TSource, TResult>
Returns a sequence resulting from applying a function to each element in the source sequence and its predecessor, with the exception of the first element which is only returned as the predecessor of the second element.
Public methodStatic memberPipe<T>
Executes the given action on each element in the source sequence and yields it.
Public methodStatic memberPrepend<TSource>
Prepends a single value to a sequence.
Public methodStatic memberCode examplePreScan<TSource>
Performs a pre-scan (exclusive prefix sum) on a sequence of elements.
Public methodStatic memberCode exampleScan<TSource>(IEnumerable<TSource>, Func<TSource, TSource, TSource>)
Peforms a scan (inclusive prefix sum) on a sequence of elements.
Public methodStatic memberCode exampleScan<TSource, TState>(IEnumerable<TSource>, TState, Func<TState, TSource, TState>)
Public methodStatic memberCode exampleSingleOrFallback<TSource>
Returns the single element in the given sequence, or the result of executing a fallback delegate if the sequence is empty. This method throws an exception if there is more than one element in the sequence.
Public methodStatic memberSkipUntil<TSource>
Skips items from the input sequence until the given predicate returns true when applied to the current source item; that item will be the last skipped.
Public methodStatic memberSplit<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>)
Splits the source sequence by separator elements identified by a function.
Public methodStatic memberSplit<TSource>(IEnumerable<TSource>, TSource)
Splits the source sequence by a separator.
Public methodStatic memberSplit<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>, Int32)
Splits the source sequence by separator elements identified by a function, given a maximum count of splits.
Public methodStatic memberSplit<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>)
Splits the source sequence by a separator and then transforms the splits into results.
Public methodStatic memberSplit<TSource>(IEnumerable<TSource>, TSource, Int32)
Splits the source sequence by a separator given a maximum count of splits.
Public methodStatic memberSplit<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>, Int32)
Splits the source sequence by a separator, given a maximum count of splits. A parameter specifies how the separator is compared for equality.
Public methodStatic memberSplit<TSource, TResult>(IEnumerable<TSource>, Func<TSource, Boolean>, Func<IEnumerable<TSource>, TResult>)
Splits the source sequence by separator elements identified by a function and then transforms the splits into results.
Public methodStatic memberSplit<TSource, TResult>(IEnumerable<TSource>, TSource, Func<IEnumerable<TSource>, TResult>)
Splits the source sequence by a separator and then transforms the splits into results.
Public methodStatic memberSplit<TSource, TResult>(IEnumerable<TSource>, Func<TSource, Boolean>, Int32, Func<IEnumerable<TSource>, TResult>)
Splits the source sequence by separator elements identified by a function, given a maximum count of splits, and then transforms the splits into results.
Public methodStatic memberSplit<TSource, TResult>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>, Func<IEnumerable<TSource>, TResult>)
Splits the source sequence by a separator and then transforms the splits into results. A parameter specifies how the separator is compared for equality.
Public methodStatic memberSplit<TSource, TResult>(IEnumerable<TSource>, TSource, Int32, Func<IEnumerable<TSource>, TResult>)
Splits the source sequence by a separator, given a maximum count of splits, and then transforms the splits into results.
Public methodStatic memberSplit<TSource, TResult>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>, Int32, Func<IEnumerable<TSource>, TResult>)
Splits the source sequence by a separator, given a maximum count of splits, and then transforms the splits into results. A parameter specifies how the separator is compared for equality.
Public methodStatic memberCode exampleTakeEvery<TSource>
Returns every N-th element of a sequence.
Public methodStatic memberCode exampleTakeLast<TSource>
Returns a specified number of contiguous elements from the end of a sequence.
Public methodStatic memberTakeUntil<TSource>
Returns items from the input sequence until the given predicate returns true when applied to the current source item; that item will be the last returned.
Public methodStatic memberToDataTable<T>(IEnumerable<T>)
Converts a sequence to a DataTable object.
Public methodStatic memberToDataTable<T>(IEnumerable<T>,Expression<Func<T, Object>>[])
Appends elements in the sequence as rows of a given DataTable object with a set of lambda expressions specifying which members (property or field) of each element in the sequence will supply the column values.
Public methodStatic memberToDataTable<T, TTable>(IEnumerable<T>, TTable)
Appends elements in the sequence as rows of a given DataTable object.
Public methodStatic memberToDataTable<T, TTable>(IEnumerable<T>, TTable,Expression<Func<T, Object>>[])
Appends elements in the sequence as rows of a given DataTable object with a set of lambda expressions specifying which members (property or field) of each element in the sequence will supply the column values.
Public methodStatic memberToDelimitedString(IEnumerable<Boolean>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Byte>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Char>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Decimal>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Double>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Int16>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Int32>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Int64>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<SByte>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Single>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<String>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<UInt16>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<UInt32>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<UInt64>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString(IEnumerable<Boolean>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Byte>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Char>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Decimal>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Double>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Int16>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Int32>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Int64>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<SByte>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<Single>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<String>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<UInt16>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<UInt32>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString(IEnumerable<UInt64>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToDelimitedString<TSource>(IEnumerable<TSource>)
Creates a delimited string from a sequence of values. The delimiter used depends on the current culture of the executing thread.
Public methodStatic memberToDelimitedString<TSource>(IEnumerable<TSource>, String)
Creates a delimited string from a sequence of values and a given delimiter.
Public methodStatic memberToHashSet<TSource>(IEnumerable<TSource>)
Public methodStatic memberToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)
Public methodStatic memberTrace<TSource>(IEnumerable<TSource>)
Traces the elements of a source sequence for diagnostics.
Public methodStatic memberTrace<TSource>(IEnumerable<TSource>, Func<TSource, String>)
Traces the elements of a source sequence for diagnostics using a custom formatter.
Public methodStatic memberTrace<TSource>(IEnumerable<TSource>, String)
Traces the elements of a source sequence for diagnostics using custom formatting.
Public methodStatic memberCode exampleZip<TFirst, TSecond, TResult>
Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences.
Public methodStatic memberCode exampleZipLongest<TFirst, TSecond, TResult>
Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences.
Top
See Also