# C1.LiveLinq.Hints.Indexed

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_Hints_Indexed_" data-uid="C1.LiveLinq.Hints.Indexed*">Indexed Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_Hints_Indexed_" data-uid="C1.LiveLinq.Hints.Indexed*"></a>
<h4 id="C1_LiveLinq_Hints_Indexed__1___0_C1_LiveLinq_IndexingHintAction_" data-uid="C1.LiveLinq.Hints.Indexed``1(``0,C1.LiveLinq.IndexingHintAction)">Indexed&lt;T&gt;(T, IndexingHintAction)</h4>
<div class="markdown level1 summary"><p>A hint with specified action.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static T Indexed&lt;T&gt;(this T value, IndexingHintAction action)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Indexed(Of T)(value As T, action As IndexingHintAction) As T</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><span class="xref">T</span></td>
      <td><span class="parametername">value</span></td>
      <td><p>The value of the expression the hint is applied to. This value is not actually used by the hint,
because the hint is never executed, its role is purely declarative.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.LiveLinq.IndexingHintAction.html">IndexingHintAction</a></td>
      <td><span class="parametername">action</span></td>
      <td><p>The action specified by the hint.</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><span class="xref">T</span></td>
      <td><p>Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed,
its role is purely declarative.</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">T</span></td>
      <td><p>This can be any type, because hints are applicable to expressions of any type.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_Hints_Indexed__1___0_C1_LiveLinq_IndexingHintAction__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>A hint does not change the value of the expression it is applied to.
It only tells LiveLinq query optimizer to create and use an index on that expression, if possible.
In fact, hints are removed from the expression before it is executed.</p>
<p><b>See Also:</b> <span style="C1H Jump">How to create indexes</span>.</p>
</div>


<a id="C1_LiveLinq_Hints_Indexed_" data-uid="C1.LiveLinq.Hints.Indexed*"></a>
<h4 id="C1_LiveLinq_Hints_Indexed__1___0_" data-uid="C1.LiveLinq.Hints.Indexed``1(``0)">Indexed&lt;T&gt;(T)</h4>
<div class="markdown level1 summary"><p>A hint with default action.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static T Indexed&lt;T&gt;(this T value)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Indexed(Of T)(value As T) As T</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><span class="xref">T</span></td>
      <td><span class="parametername">value</span></td>
      <td><p>The value of the expression the hint is applied to. This value is not actually used by the hint,
because the hint is never executed, its role is purely declarative.</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><span class="xref">T</span></td>
      <td><p>Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed,
its role is purely declarative.</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">T</span></td>
      <td><p>This can be any type, because hints are applicable to expressions of any type.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_Hints_Indexed__1___0__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Current default action is defined by the value of the static <a class="xref" href="C1.LiveLinq.Hints.DefaultAction.html#C1_LiveLinq_Hints_DefaultAction">DefaultAction</a> property.
By default, it is <a class="xref" href="C1.LiveLinq.IndexingHintAction.html">IndexingHintAction</a>.<b>Optional</b>.</p>
<p>Use the other <b>Indexed</b> overload if you need a hint with non-default action.</p>
<p>A hint does not change the value of the expression it is applied to.
It only tells LiveLinq query optimizer to create and use an index on that expression, if possible.
In fact, hints are removed from the expression before it is executed.</p>
<p><b>See Also:</b> <span style="C1H Jump">How to create indexes</span>.</p>
</div>
</div>
