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

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

Definition

Namespace: MoreLinq
Assembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
C#
public static IEnumerable<TResult> FullJoin<TFirst, TSecond, TKey, TResult>(
	this IEnumerable<TFirst> first,
	IEnumerable<TSecond> second,
	Func<TFirst, TKey> firstKeySelector,
	Func<TSecond, TKey> secondKeySelector,
	Func<TFirst, TResult> firstSelector,
	Func<TSecond, TResult> secondSelector,
	Func<TFirst, TSecond, TResult> bothSelector,
	IEqualityComparer<TKey>? comparer
)

Parameters

first  IEnumerableTFirst
The first sequence to join fully.
second  IEnumerableTSecond
The second sequence to join fully.
firstKeySelector  FuncTFirst, TKey
Function that projects the key given an element from first.
secondKeySelector  FuncTSecond, TKey
Function that projects the key given an element from second.
firstSelector  FuncTFirst, TResult
Function that projects the result given just an element from first where there is no corresponding element in second.
secondSelector  FuncTSecond, TResult
Function that projects the result given just an element from second where there is no corresponding element in first.
bothSelector  FuncTFirst, TSecond, TResult
Function that projects the result given an element from first and an element from second that match on a common key.
comparer  IEqualityComparerTKey
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

IEnumerableTResult
A sequence containing results projected from a full 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