Click or drag to resize

MoreEnumerableSortedMergeTSource Method (IEnumerableTSource, OrderByDirection, IComparerTSource, IEnumerableTSource)

Merges two or more sequences that are in a common order (either ascending or descending) into a single sequence that preserves that order.

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 2.4.0
Syntax
public static IEnumerable<TSource> SortedMerge<TSource>(
	this IEnumerable<TSource> source,
	OrderByDirection direction,
	IComparer<TSource> comparer,
	params IEnumerable<TSource>[] otherSequences
)

Parameters

source
Type: System.Collections.GenericIEnumerableTSource
The primary sequence with which to merge
direction
Type: MoreLinqOrderByDirection
The ordering that all sequences must already exhibit
comparer
Type: System.Collections.GenericIComparerTSource
The comparer used to evaluate the relative order between elements
otherSequences
Type: System.Collections.GenericIEnumerableTSource
A variable argument array of zero or more other sequences to merge with

Type Parameters

TSource
The type of the elements in the sequence

Return Value

Type: IEnumerableTSource
A merged, order-preserving sequence containing al of the elements of the original sequences

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also