Click or drag to resize

EnumerableExtensionsJoinConditionalT1, T2, TResult(IEnumerableT1, IEnumerableT2, FuncT1, T2, Boolean, FuncT1, T2, TResult) Method

Takes a join of two sequences, but only takes into account those pair, which fulfill a given condition.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static IEnumerable<TResult> JoinConditional<T1, T2, TResult>(
	this IEnumerable<T1> seq1,
	IEnumerable<T2> seq2,
	Func<T1, T2, bool> Condition,
	Func<T1, T2, TResult> CreateResult
)

Parameters

seq1  IEnumerableT1
The first sequence.
seq2  IEnumerableT2
The second sequence.
Condition  FuncT1, T2, Boolean
A condition that is evaluated for each pair of (T1, T2). Only if the return value is true, the pair (T1, T2) is put into the output sequence.
CreateResult  FuncT1, T2, TResult
A function that takes a pair of T1 and T2 as parameters, and returns the result.

Type Parameters

T1
The element type of the 1st sequence.
T2
The element type of the 2nd sequence.
TResult
The element type of the resulting sequence.

Return Value

IEnumerableTResult
The resulting sequence of with elements of type TResult.

Usage Note

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