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.2.0
Syntax public static IEnumerable<TSource> SortedMerge<TSource>(
this IEnumerable<TSource> source,
OrderByDirection direction,
IComparer<TSource> comparer,
params IEnumerable<TSource>[] otherSequences
)
<ExtensionAttribute>
Public Shared Function SortedMerge(Of TSource) (
source As IEnumerable(Of TSource),
direction As OrderByDirection,
comparer As IComparer(Of TSource),
ParamArray otherSequences As IEnumerable(Of TSource)()
) As IEnumerable(Of TSource)
public:
[ExtensionAttribute]
generic<typename TSource>
static IEnumerable<TSource>^ SortedMerge(
IEnumerable<TSource>^ source,
OrderByDirection direction,
IComparer<TSource>^ comparer,
... array<IEnumerable<TSource>^>^ otherSequences
)
[<ExtensionAttribute>]
static member SortedMerge :
source : IEnumerable<'TSource> *
direction : OrderByDirection *
comparer : IComparer<'TSource> *
otherSequences : IEnumerable<'TSource>[] -> IEnumerable<'TSource>
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:
IEnumerableTSourceA 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