# C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*">IndexedField Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*"></a>
<h4 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Int32_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField``1(System.Data.DataRow,System.Int32)">IndexedField&lt;T&gt;(DataRow, int)</h4>
<div class="markdown level1 summary"><p>A hint to create and use an index on the specified data column. The hint has 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 IndexedField&lt;T&gt;(this DataRow row, int columnIndex)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function IndexedField(Of T)(row As DataRow, columnIndex As Integer) 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarow">DataRow</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The data row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>The zero-based ordinal position of the column.</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>The data column value.</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>The type of the data column</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method <b>IndexedField</b> is replaced with the standard LINQ to DataSet extension method
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarowextensions.field#system-data-datarowextensions-field-1(system-data-datarow-system-string)">Field</a>. See <a class="xref" href="C1.LiveLinq.Hints.html">Hints</a> for more details.</p>
</div>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Int32__examples">Examples</h5>
<pre><code class="lang-csharp">var query = from c in customersTable
    where c.IndexedField&lt;string&gt;(0) == "ALFKI"
    select c;</code></pre>



<a id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*"></a>
<h4 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Data_DataColumn_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField``1(System.Data.DataRow,System.Data.DataColumn)">IndexedField&lt;T&gt;(DataRow, DataColumn)</h4>
<div class="markdown level1 summary"><p>A hint to create and use an index on the specified data column. The hint has 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 IndexedField&lt;T&gt;(this DataRow row, DataColumn column)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function IndexedField(Of T)(row As DataRow, column As DataColumn) 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarow">DataRow</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The data row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datacolumn">DataColumn</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>The data column.</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>The data column value.</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>The type of the data column</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Data_DataColumn__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method <b>IndexedField</b> is replaced with the standard LINQ to DataSet extension method
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarowextensions.field#system-data-datarowextensions-field-1(system-data-datarow-system-string)">Field</a>. See <a class="xref" href="C1.LiveLinq.Hints.html">Hints</a> for more details.</p>
</div>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Data_DataColumn__examples">Examples</h5>
<pre><code class="lang-csharp">var query = from c in customersTable
    where c.IndexedField&lt;string&gt;(customerColumn) == "ALFKI"
    select c;</code></pre>



<a id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*"></a>
<h4 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_String_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField``1(System.Data.DataRow,System.String)">IndexedField&lt;T&gt;(DataRow, string)</h4>
<div class="markdown level1 summary"><p>A hint to create and use an index on the specified data column. The hint has 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 IndexedField&lt;T&gt;(this DataRow row, string columnName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function IndexedField(Of T)(row As DataRow, columnName As String) 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarow">DataRow</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The data row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">columnName</span></td>
      <td><p>The name of the column.</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>The data column value.</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>The type of the data column</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method <b>IndexedField</b> is replaced with the standard LINQ to DataSet extension method
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarowextensions.field#system-data-datarowextensions-field-1(system-data-datarow-system-string)">Field</a>. See <a class="xref" href="C1.LiveLinq.Hints.html">Hints</a> for more details.</p>
</div>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_String__examples">Examples</h5>
<pre><code class="lang-csharp">var query = from c in customersTable
    where c.IndexedField&lt;string&gt;("CustomerID") == "ALFKI"
    select c;</code></pre>



<a id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*"></a>
<h4 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Int32_C1_LiveLinq_IndexingHintAction_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField``1(System.Data.DataRow,System.Int32,C1.LiveLinq.IndexingHintAction)">IndexedField&lt;T&gt;(DataRow, int, IndexingHintAction)</h4>
<div class="markdown level1 summary"><p>A hint to create and use an index on the specified data column. The hint has 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 IndexedField&lt;T&gt;(this DataRow row, int columnIndex, IndexingHintAction action)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function IndexedField(Of T)(row As DataRow, columnIndex As Integer, 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarow">DataRow</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The data row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>The zero-based ordinal position of the column.</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>The data column value.</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>The type of the data column</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Int32_C1_LiveLinq_IndexingHintAction__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method <b>IndexedField</b> is replaced with the standard LINQ to DataSet extension method
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarowextensions.field#system-data-datarowextensions-field-1(system-data-datarow-system-string)">Field</a>. See <a class="xref" href="C1.LiveLinq.Hints.html">Hints</a> for more details.</p>
</div>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Int32_C1_LiveLinq_IndexingHintAction__examples">Examples</h5>
<pre><code class="lang-csharp">var query = from c in customersTable
    where c.IndexedField&lt;string&gt;(0, IndexingHintAction.Mandatory) == "ALFKI"
    select c;</code></pre>



<a id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*"></a>
<h4 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Data_DataColumn_C1_LiveLinq_IndexingHintAction_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField``1(System.Data.DataRow,System.Data.DataColumn,C1.LiveLinq.IndexingHintAction)">IndexedField&lt;T&gt;(DataRow, DataColumn, IndexingHintAction)</h4>
<div class="markdown level1 summary"><p>A hint to create and use an index on the specified data column. The hint has 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 IndexedField&lt;T&gt;(this DataRow row, DataColumn column, IndexingHintAction action)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function IndexedField(Of T)(row As DataRow, column As DataColumn, 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarow">DataRow</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The data row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datacolumn">DataColumn</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>The data column.</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>The data column value.</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>The type of the data column</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Data_DataColumn_C1_LiveLinq_IndexingHintAction__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method <b>IndexedField</b> is replaced with the standard LINQ to DataSet extension method
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarowextensions.field#system-data-datarowextensions-field-1(system-data-datarow-system-string)">Field</a>. See <a class="xref" href="C1.LiveLinq.Hints.html">Hints</a> for more details.</p>
</div>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_Data_DataColumn_C1_LiveLinq_IndexingHintAction__examples">Examples</h5>
<pre><code class="lang-csharp">var query =
    from c in customersTable
    where c.IndexedField&lt;string&gt;(customerColumn, IndexingHintAction.Mandatory) == "ALFKI"
    select c;</code></pre>



<a id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField*"></a>
<h4 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_String_C1_LiveLinq_IndexingHintAction_" data-uid="C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField``1(System.Data.DataRow,System.String,C1.LiveLinq.IndexingHintAction)">IndexedField&lt;T&gt;(DataRow, string, IndexingHintAction)</h4>
<div class="markdown level1 summary"><p>A hint to create and use an index on the specified data column. The hint has 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 IndexedField&lt;T&gt;(this DataRow row, string columnName, IndexingHintAction action)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function IndexedField(Of T)(row As DataRow, columnName As String, 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarow">DataRow</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The data row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">columnName</span></td>
      <td><p>The name of the column.</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>The data column value.</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>The type of the data column</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_String_C1_LiveLinq_IndexingHintAction__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method <b>IndexedField</b> is replaced with the standard LINQ to DataSet extension method
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datarowextensions.field#system-data-datarowextensions-field-1(system-data-datarow-system-string)">Field</a>. See <a class="xref" href="C1.LiveLinq.Hints.html">Hints</a> for more details.</p>
</div>
<h5 id="C1_LiveLinq_AdoNet_AdoNetExtensions_IndexedField__1_System_Data_DataRow_System_String_C1_LiveLinq_IndexingHintAction__examples">Examples</h5>
<pre><code class="lang-csharp">var query =
    from c in customersTable
    where c.IndexedField&lt;string&gt;("CustomerID", IndexingHintAction.Mandatory) == "ALFKI"
    select c;</code></pre>

</div>
