Click or drag to resize

XEnumerableRightOuterJoinTLeft, TRight, TKey, TResult Method

Produces the right outer join of two sequences.

Namespace:  Linq.Extras
Assembly:  Linq.Extras (in Linq.Extras.dll) Version: 5.0.0+96a4f4bfed64095342c5df107c1fe1fb95603ee5
Syntax
public static IEnumerable<TResult> RightOuterJoin<TLeft, TRight, TKey, TResult>(
	this IEnumerable<TLeft> left,
	IEnumerable<TRight> right,
	Func<TLeft, TKey> leftKeySelector,
	Func<TRight, TKey> rightKeySelector,
	Func<TLeft, TRight, TResult> resultSelector,
	TLeft defaultLeft = null,
	IEqualityComparer<TKey>? keyComparer = null
)

Parameters

left
Type: System.Collections.GenericIEnumerableTLeft
The left sequence.
right
Type: System.Collections.GenericIEnumerableTRight
The right sequence.
leftKeySelector
Type: SystemFuncTLeft, TKey
The key selector for elements of the left sequence.
rightKeySelector
Type: SystemFuncTRight, TKey
The key selector for elements of the right sequence.
resultSelector
Type: SystemFuncTLeft, TRight, TResult
A function to produce an output element from two matching elements from the left and right sequences.
defaultLeft (Optional)
Type: TLeft
The default value to use for missing elements in left.
keyComparer (Optional)
Type: System.Collections.GenericIEqualityComparerTKey
A comparer to test for equality between the keys.

Type Parameters

TLeft
The type of the elements of left.
TRight
The type of the elements of right.
TKey
The type of the key used to join elements.
TResult
The type of the elements of the output sequence

Return Value

Type: IEnumerableTResult
The right outer join of left and right.

Usage Note

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