Click or drag to resize

MoreEnumerableRightJoinTSource, TKey, TResult Method (IEnumerableTSource, IEnumerableTSource, FuncTSource, TKey, FuncTSource, TResult, FuncTSource, TSource, TResult, IEqualityComparerTKey)

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

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 2.10.0
Syntax
public static IEnumerable<TResult> RightJoin<TSource, TKey, TResult>(
	this IEnumerable<TSource> first,
	IEnumerable<TSource> second,
	Func<TSource, TKey> keySelector,
	Func<TSource, TResult> secondSelector,
	Func<TSource, TSource, TResult> bothSelector,
	IEqualityComparer<TKey> comparer
)

Parameters

first
Type: System.Collections.GenericIEnumerableTSource
The first sequence of the join operation.
second
Type: System.Collections.GenericIEnumerableTSource
The second sequence of the join operation.
keySelector
Type: SystemFuncTSource, TKey
Function that projects the key given an element of one of the sequences to join.
secondSelector
Type: SystemFuncTSource, TResult
Function that projects the result given just an element from second where there is no corresponding element in first.
bothSelector
Type: SystemFuncTSource, TSource, 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

TSource
The type of elements in the source sequence.
TKey
The type of the key returned by the key selector function.
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 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