Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

Correlates in parallel the elements of two sequences based on key equality and groups the results. A specified IEqualityComparer<T> is used to compare keys.

Namespace:  System.Linq
Assemblies:   System.Linq.Parallel (in System.Linq.Parallel.dll)
  System.Core (in System.Core.dll)

generic<typename TOuter, typename TInner, typename TKey, typename TResult>
static ParallelQuery<TResult>^ GroupJoin(
	ParallelQuery<TOuter>^ outer, 
	ParallelQuery<TInner>^ inner, 
	Func<TOuter, TKey>^ outerKeySelector, 
	Func<TInner, TKey>^ innerKeySelector, 
	Func<TOuter, IEnumerable<TInner>^, TResult>^ resultSelector, 
	IEqualityComparer<TKey>^ comparer

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.


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.

Type: System.Collections.Generic::IEqualityComparer<TKey>

An IEqualityComparer<T> to hash and compare keys.

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.

Usage Note

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


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.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

.NET for Windows Phone apps

Supported in: Windows Phone 8.1

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft