# C1.LiveLinq.Indexing.Subindex-2.KeySelector

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_Indexing_Subindex_2_KeySelector_" data-uid="C1.LiveLinq.Indexing.Subindex`2.KeySelector*">KeySelector Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_Indexing_Subindex_2_KeySelector_" data-uid="C1.LiveLinq.Indexing.Subindex`2.KeySelector*"></a>
<h4 id="C1_LiveLinq_Indexing_Subindex_2_KeySelector" data-uid="C1.LiveLinq.Indexing.Subindex`2.KeySelector">KeySelector</h4>
<div class="markdown level1 summary"><p>Gets the expression used to obtain key value from an element of the indexed collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Expression&lt;Func&lt;T, TKey&gt;&gt; KeySelector { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public ReadOnly Property KeySelector As Expression(Of Func(Of T, TKey))</code></pre>
</div>
<h5 class="propertyValue">Property Value</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="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;T, TKey&gt;&gt;</td>
      <td><p>An expression calculating the key value from an item (element of the collection).
Typically, this is a field or a property in the item class, although more complex expressions can also be used.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
