MoreEnumerableFullGroupJoinTFirst, TSecond, TKey(IEnumerableTFirst, IEnumerableTSecond, FuncTFirst, TKey, FuncTSecond, TKey, IEqualityComparerTKey) Method

Performs a Full Group Join between the first and second sequences.

Definition

Namespace: MoreLinq
Assembly: MoreLinq (in MoreLinq.dll) Version: 4.1.0+0e154ef592f33ce0f6f3d534a9eedee273f0ce72
C#
public static IEnumerable<(TKey , IEnumerable<TFirst> First, IEnumerable<TSecond> Second)> FullGroupJoin<TFirst, TSecond, TKey>(
	this IEnumerable<TFirst> first,
	IEnumerable<TSecond> second,
	Func<TFirst, TKey> firstKeySelector,
	Func<TSecond, TKey> secondKeySelector,
	IEqualityComparer<TKey>? comparer
)

Parameters

first  IEnumerableTFirst
First sequence
second  IEnumerableTSecond
Second sequence
firstKeySelector  FuncTFirst, TKey
The mapping from first sequence to key
secondKeySelector  FuncTSecond, TKey
The mapping from second sequence to key
comparer  IEqualityComparerTKey
The equality comparer to use to determine whether or not keys are equal. If null, the default equality comparer for TKey is used.

Type Parameters

TFirst
The type of the elements in the first input sequence
TSecond
The type of the elements in the second input sequence
TKey
The type of the key to use to join

Return Value

IEnumerableValueTupleTKey, IEnumerableTFirst, IEnumerableTSecond
A sequence of elements joined from first and second.

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).

Remarks

This operator uses deferred execution and streams the results. The results are yielded in the order of the elements found in the first sequence followed by those found only in the second. In addition, the callback responsible for projecting the results is supplied with sequences which preserve their source order.

See Also