Click or drag to resize

MoreEnumerableOrderedMergeT Method (IEnumerableT, IEnumerableT, IComparerT)

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.

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 3.0.0
Syntax
public static IEnumerable<T> OrderedMerge<T>(
	this IEnumerable<T> first,
	IEnumerable<T> second,
	IComparer<T> comparer
)

Parameters

first
Type: System.Collections.GenericIEnumerableT
The first input sequence.
second
Type: System.Collections.GenericIEnumerableT
The second input sequence.
comparer
Type: System.Collections.GenericIComparerT
An IComparerT to compare elements.

Type Parameters

T
Type of elements in input and output sequences.

Return Value

Type: IEnumerableT
A sequence with elements from the two input sequences merged, as in a full outer join.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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).
Remarks
This method uses deferred execution. The behavior is undefined if the sequences are unordered as inputs.
See Also