Click or drag to resize

MoreEnumerableRightJoinTFirst, TSecond, TKey, TResult Method (IEnumerableTFirst, IEnumerableTSecond, FuncTFirst, TKey, FuncTSecond, TKey, FuncTSecond, TResult, FuncTFirst, TSecond, TResult, IEqualityComparerTKey)

Performs a right outer join on two heterogeneous sequences. Additional arguments specify key selection functions, result projection functions and a key comparer.

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 3.0.0
Syntax
public static IEnumerable<TResult> RightJoin<TFirst, TSecond, TKey, TResult>(
	this IEnumerable<TFirst> first,
	IEnumerable<TSecond> second,
	Func<TFirst, TKey> firstKeySelector,
	Func<TSecond, TKey> secondKeySelector,
	Func<TSecond, TResult> secondSelector,
	Func<TFirst, TSecond, TResult> bothSelector,
	IEqualityComparer<TKey> comparer
)

Parameters

first
Type: System.Collections.GenericIEnumerableTFirst
The first sequence of the join operation.
second
Type: System.Collections.GenericIEnumerableTSecond
The second sequence of the join operation.
firstKeySelector
Type: SystemFuncTFirst, TKey
Function that projects the key given an element from first.
secondKeySelector
Type: SystemFuncTSecond, TKey
Function that projects the key given an element from second.
secondSelector
Type: SystemFuncTSecond, TResult
Function that projects the result given just an element from second where there is no corresponding element in first.
bothSelector
Type: SystemFuncTFirst, TSecond, TResult
Function that projects the result given an element from first and an element from second that match on a common key.
comparer
Type: System.Collections.GenericIEqualityComparerTKey
The IEqualityComparerT instance used to compare keys for equality.

Type Parameters

TFirst
The type of elements in the first sequence.
TSecond
The type of elements in the second sequence.
TKey
The type of the key returned by the key selector functions.
TResult
The type of the result elements.

Return Value

Type: IEnumerableTResult
A sequence containing results projected from a right outer join of the two input sequences.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTFirst. 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