# C1.LiveLinq.Indexing.IndexDefinition-1.KeySelector

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_Indexing_IndexDefinition_1_KeySelector_" data-uid="C1.LiveLinq.Indexing.IndexDefinition`1.KeySelector*">KeySelector Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_Indexing_IndexDefinition_1_KeySelector_" data-uid="C1.LiveLinq.Indexing.IndexDefinition`1.KeySelector*"></a>
<h4 id="C1_LiveLinq_Indexing_IndexDefinition_1_KeySelector" data-uid="C1.LiveLinq.Indexing.IndexDefinition`1.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 LambdaExpression KeySelector { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public ReadOnly Property KeySelector As LambdaExpression</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.lambdaexpression">LambdaExpression</a></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>
