LeftJoinExtensionLeftJoinTSource, TKey, TResult(IEnumerableTSource, IEnumerableTSource, FuncTSource, TKey, FuncTSource, TResult, FuncTSource, TSource, TResult, IEqualityComparerTKey) Method
Performs a left outer join on two homogeneous sequences.
Additional arguments specify key selection functions, result
projection functions and a key comparer.
Namespace: MoreLinq.ExtensionsAssembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
public static IEnumerable<TResult> LeftJoin<TSource, TKey, TResult>(
this IEnumerable<TSource> first,
IEnumerable<TSource> second,
Func<TSource, TKey> keySelector,
Func<TSource, TResult> firstSelector,
Func<TSource, TSource, TResult> bothSelector,
IEqualityComparer<TKey>? comparer
)
<ExtensionAttribute>
Public Shared Function LeftJoin(Of TSource, TKey, TResult) (
first As IEnumerable(Of TSource),
second As IEnumerable(Of TSource),
keySelector As Func(Of TSource, TKey),
firstSelector As Func(Of TSource, TResult),
bothSelector As Func(Of TSource, TSource, TResult),
comparer As IEqualityComparer(Of TKey)
) As IEnumerable(Of TResult)
public:
[ExtensionAttribute]
generic<typename TSource, typename TKey, typename TResult>
static IEnumerable<TResult>^ LeftJoin(
IEnumerable<TSource>^ first,
IEnumerable<TSource>^ second,
Func<TSource, TKey>^ keySelector,
Func<TSource, TResult>^ firstSelector,
Func<TSource, TSource, TResult>^ bothSelector,
IEqualityComparer<TKey>^ comparer
)
[<ExtensionAttribute>]
static member LeftJoin :
first : IEnumerable<'TSource> *
second : IEnumerable<'TSource> *
keySelector : Func<'TSource, 'TKey> *
firstSelector : Func<'TSource, 'TResult> *
bothSelector : Func<'TSource, 'TSource, 'TResult> *
comparer : IEqualityComparer<'TKey> -> IEnumerable<'TResult>
- first IEnumerableTSource
-
The first sequence of the join operation.
- second IEnumerableTSource
-
The second sequence of the join operation.
- keySelector FuncTSource, TKey
-
Function that projects the key given an element of one of the
sequences to join.
- firstSelector FuncTSource, TResult
-
Function that projects the result given just an element from
first where there is no corresponding element
in second.
- bothSelector FuncTSource, TSource, 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.
- TSource
-
The type of elements in the source sequence.
- TKey
-
The type of the key returned by the key selector function.
- TResult
-
The type of the result elements.
IEnumerableTResultA sequence containing results projected from a left
outer join of the two input sequences.In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. 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).