MoreEnumerable.RightJoin<TSource, TKey, TResult> Method (IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TResult>, Func<TSource, TSource, TResult>) |
Performs a right outer join on two homogeneous sequences.
Additional arguments specify key selection functions and result
projection functions.
Namespace:
MoreLinq
Assembly:
MoreLinq (in MoreLinq.dll) Version: 3.3.1+b77df70598ab84c28cd43dcf74594024b6d575e1
Syntaxpublic static IEnumerable<TResult> RightJoin<TSource, TKey, TResult>(
this IEnumerable<TSource> first,
IEnumerable<TSource> second,
Func<TSource, TKey> keySelector,
Func<TSource, TResult> secondSelector,
Func<TSource, TSource, TResult> bothSelector
)
<ExtensionAttribute>
Public Shared Function RightJoin(Of TSource, TKey, TResult) (
first As IEnumerable(Of TSource),
second As IEnumerable(Of TSource),
keySelector As Func(Of TSource, TKey),
secondSelector As Func(Of TSource, TResult),
bothSelector As Func(Of TSource, TSource, TResult)
) As IEnumerable(Of TResult)
public:
[ExtensionAttribute]
generic<typename TSource, typename TKey, typename TResult>
static IEnumerable<TResult>^ RightJoin(
IEnumerable<TSource>^ first,
IEnumerable<TSource>^ second,
Func<TSource, TKey>^ keySelector,
Func<TSource, TResult>^ secondSelector,
Func<TSource, TSource, TResult>^ bothSelector
)
[<ExtensionAttribute>]
static member RightJoin :
first : IEnumerable<'TSource> *
second : IEnumerable<'TSource> *
keySelector : Func<'TSource, 'TKey> *
secondSelector : Func<'TSource, 'TResult> *
bothSelector : Func<'TSource, 'TSource, 'TResult> -> IEnumerable<'TResult>
Parameters
- first
- Type: System.Collections.Generic.IEnumerable<TSource>
The first sequence of the join operation. - second
- Type: System.Collections.Generic.IEnumerable<TSource>
The second sequence of the join operation. - keySelector
- Type: System.Func<TSource, TKey>
Function that projects the key given an element of one of the
sequences to join. - secondSelector
- Type: System.Func<TSource, TResult>
Function that projects the result given just an element from
second where there is no corresponding element
in first. - bothSelector
- Type: System.Func<TSource, TSource, TResult>
Function that projects the result given an element from
first and an element from second
that match on a common key.
Type Parameters
- 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.
Return Value
Type:
IEnumerable<TResult>A sequence containing results projected from a right
outer join of the two input sequences.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerable<TSource>. 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