# C1.LiveLinq.IndexedQueryExtensions.Join

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_IndexedQueryExtensions_Join_" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join*">Join Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_IndexedQueryExtensions_Join_" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join*"></a>
<h4 id="C1_LiveLinq_IndexedQueryExtensions_Join__4_C1_LiveLinq_Indexing_IIndexedSource___0__System_Collections_Generic_IEnumerable___1__System_Linq_Expressions_Expression_System_Func___0___2___System_Linq_Expressions_Expression_System_Func___1___2___System_Linq_Expressions_Expression_System_Func___0___1___3___" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join``4(C1.LiveLinq.Indexing.IIndexedSource{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}})">Join&lt;TOuter, TInner, TKey, TResult&gt;(IIndexedSource&lt;TOuter&gt;, IEnumerable&lt;TInner&gt;, Expression&lt;Func&lt;TOuter, TKey&gt;&gt;, Expression&lt;Func&lt;TInner, TKey&gt;&gt;, Expression&lt;Func&lt;TOuter, TInner, TResult&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Correlates the elements of two collections based on matching keys.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IIndexedSource&lt;TResult&gt; Join&lt;TOuter, TInner, TKey, TResult&gt;(this IIndexedSource&lt;TOuter&gt; outer, IEnumerable&lt;TInner&gt; inner, Expression&lt;Func&lt;TOuter, TKey&gt;&gt; outerKeySelector, Expression&lt;Func&lt;TInner, TKey&gt;&gt; innerKeySelector, Expression&lt;Func&lt;TOuter, TInner, TResult&gt;&gt; resultSelector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Join(Of TOuter, TInner, TKey, TResult)(outer As IIndexedSource(Of TOuter), inner As IEnumerable(Of TInner), outerKeySelector As Expression(Of Func(Of TOuter, TKey)), innerKeySelector As Expression(Of Func(Of TInner, TKey)), resultSelector As Expression(Of Func(Of TOuter, TInner, TResult))) As IIndexedSource(Of TResult)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TOuter&gt;</td>
      <td><span class="parametername">outer</span></td>
      <td><p>The first collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TInner&gt;</td>
      <td><span class="parametername">inner</span></td>
      <td><p>The second collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TOuter, TKey&gt;&gt;</td>
      <td><span class="parametername">outerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TInner, TKey&gt;&gt;</td>
      <td><span class="parametername">innerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;TOuter, TInner, TResult&gt;&gt;</td>
      <td><span class="parametername">resultSelector</span></td>
      <td><p>A function to create a result element from two matching elements.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TResult&gt;</td>
      <td><p>An <a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource&lt;TResult&gt;</a> that has elements of type <i>TResult</i> that are obtained by performing an inner join on two collections.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">TOuter</span></td>
      <td><p>The type of the elements of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TInner</span></td>
      <td><p>The type of the elements of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TKey</span></td>
      <td><p>The type of the keys returned by the key selector functions.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TResult</span></td>
      <td><p>The type of the result elements.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_LiveLinq_IndexedQueryExtensions_Join_" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join*"></a>
<h4 id="C1_LiveLinq_IndexedQueryExtensions_Join__4_System_Collections_Generic_IEnumerable___0__C1_LiveLinq_Indexing_IIndexedSource___1__System_Linq_Expressions_Expression_System_Func___0___2___System_Linq_Expressions_Expression_System_Func___1___2___System_Linq_Expressions_Expression_System_Func___0___1___3___" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join``4(System.Collections.Generic.IEnumerable{``0},C1.LiveLinq.Indexing.IIndexedSource{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}})">Join&lt;TOuter, TInner, TKey, TResult&gt;(IEnumerable&lt;TOuter&gt;, IIndexedSource&lt;TInner&gt;, Expression&lt;Func&lt;TOuter, TKey&gt;&gt;, Expression&lt;Func&lt;TInner, TKey&gt;&gt;, Expression&lt;Func&lt;TOuter, TInner, TResult&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Correlates the elements of two collections based on matching keys.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IIndexedSource&lt;TResult&gt; Join&lt;TOuter, TInner, TKey, TResult&gt;(this IEnumerable&lt;TOuter&gt; outer, IIndexedSource&lt;TInner&gt; inner, Expression&lt;Func&lt;TOuter, TKey&gt;&gt; outerKeySelector, Expression&lt;Func&lt;TInner, TKey&gt;&gt; innerKeySelector, Expression&lt;Func&lt;TOuter, TInner, TResult&gt;&gt; resultSelector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Join(Of TOuter, TInner, TKey, TResult)(outer As IEnumerable(Of TOuter), inner As IIndexedSource(Of TInner), outerKeySelector As Expression(Of Func(Of TOuter, TKey)), innerKeySelector As Expression(Of Func(Of TInner, TKey)), resultSelector As Expression(Of Func(Of TOuter, TInner, TResult))) As IIndexedSource(Of TResult)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TOuter&gt;</td>
      <td><span class="parametername">outer</span></td>
      <td><p>The first collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TInner&gt;</td>
      <td><span class="parametername">inner</span></td>
      <td><p>The second collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TOuter, TKey&gt;&gt;</td>
      <td><span class="parametername">outerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TInner, TKey&gt;&gt;</td>
      <td><span class="parametername">innerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;TOuter, TInner, TResult&gt;&gt;</td>
      <td><span class="parametername">resultSelector</span></td>
      <td><p>A function to create a result element from two matching elements.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TResult&gt;</td>
      <td><p>An <a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource&lt;TResult&gt;</a> that has elements of type <i>TResult</i> that are obtained by performing an inner join on two collections.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">TOuter</span></td>
      <td><p>The type of the elements of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TInner</span></td>
      <td><p>The type of the elements of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TKey</span></td>
      <td><p>The type of the keys returned by the key selector functions.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TResult</span></td>
      <td><p>The type of the result elements.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_LiveLinq_IndexedQueryExtensions_Join_" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join*"></a>
<h4 id="C1_LiveLinq_IndexedQueryExtensions_Join__4_C1_LiveLinq_Indexing_IIndexedSource___0__C1_LiveLinq_Indexing_IIndexedSource___1__System_Linq_Expressions_Expression_System_Func___0___2___System_Linq_Expressions_Expression_System_Func___1___2___System_Linq_Expressions_Expression_System_Func___0___1___3___" data-uid="C1.LiveLinq.IndexedQueryExtensions.Join``4(C1.LiveLinq.Indexing.IIndexedSource{``0},C1.LiveLinq.Indexing.IIndexedSource{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}})">Join&lt;TOuter, TInner, TKey, TResult&gt;(IIndexedSource&lt;TOuter&gt;, IIndexedSource&lt;TInner&gt;, Expression&lt;Func&lt;TOuter, TKey&gt;&gt;, Expression&lt;Func&lt;TInner, TKey&gt;&gt;, Expression&lt;Func&lt;TOuter, TInner, TResult&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Correlates the elements of two collections based on matching keys.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IIndexedSource&lt;TResult&gt; Join&lt;TOuter, TInner, TKey, TResult&gt;(this IIndexedSource&lt;TOuter&gt; outer, IIndexedSource&lt;TInner&gt; inner, Expression&lt;Func&lt;TOuter, TKey&gt;&gt; outerKeySelector, Expression&lt;Func&lt;TInner, TKey&gt;&gt; innerKeySelector, Expression&lt;Func&lt;TOuter, TInner, TResult&gt;&gt; resultSelector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Join(Of TOuter, TInner, TKey, TResult)(outer As IIndexedSource(Of TOuter), inner As IIndexedSource(Of TInner), outerKeySelector As Expression(Of Func(Of TOuter, TKey)), innerKeySelector As Expression(Of Func(Of TInner, TKey)), resultSelector As Expression(Of Func(Of TOuter, TInner, TResult))) As IIndexedSource(Of TResult)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TOuter&gt;</td>
      <td><span class="parametername">outer</span></td>
      <td><p>The first collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TInner&gt;</td>
      <td><span class="parametername">inner</span></td>
      <td><p>The second collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TOuter, TKey&gt;&gt;</td>
      <td><span class="parametername">outerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TInner, TKey&gt;&gt;</td>
      <td><span class="parametername">innerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;TOuter, TInner, TResult&gt;&gt;</td>
      <td><span class="parametername">resultSelector</span></td>
      <td><p>A function to create a result element from two matching elements.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TResult&gt;</td>
      <td><p>An <a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource&lt;TResult&gt;</a> that has elements of type <i>TResult</i> that are obtained by performing an inner join on two collections.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">TOuter</span></td>
      <td><p>The type of the elements of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TInner</span></td>
      <td><p>The type of the elements of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TKey</span></td>
      <td><p>The type of the keys returned by the key selector functions.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TResult</span></td>
      <td><p>The type of the result elements.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
