Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ParallelEnumerable.GroupJoin<TOuter, TInner, TKey, TResult> Method (ParallelQuery<TOuter>, ParallelQuery<TInner>, Func<TOuter, TKey>, Func<TInner, TKey>, Func<TOuter, IEnumerable<TInner>, TResult>)

.NET Framework (current version)

Correlates in parallel the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys.

Namespace:   System.Linq
Assembly:  System.Core (in System.Core.dll)

public static ParallelQuery<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(
	this ParallelQuery<TOuter> outer,
	ParallelQuery<TInner> inner,
	Func<TOuter, TKey> outerKeySelector,
	Func<TInner, TKey> innerKeySelector,
	Func<TOuter, IEnumerable<TInner>, TResult> resultSelector


Type: System.Linq.ParallelQuery<TOuter>

The first sequence to join.

Type: System.Linq.ParallelQuery<TInner>

The sequence to join to the first sequence.

Type: System.Func<TOuter, TKey>

A function to extract the join key from each element of the first sequence.

Type: System.Func<TInner, TKey>

A function to extract the join key from each element of the second sequence.

Type: System.Func<TOuter, IEnumerable<TInner>, TResult>

A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence.

Return Value

Type: System.Linq.ParallelQuery<TResult>

A sequence that has elements of type TResult that are obtained by performing a grouped join on two sequences.

Type Parameters


The type of the elements of the second sequence.


The type of the elements of the first sequence.


The type of the keys returned by the key selector functions.


The type of the result elements.

Exception Condition

The query was canceled with the token passed in through WithCancellation.


source or action is a null reference (Nothing in Visual Basic).


One or more exceptions occurred during the evaluation of the query.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
© 2017 Microsoft