# C1.LiveLinq.Indexing.IndexCollection-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_LiveLinq_Indexing_IndexCollection_1" data-uid="C1.LiveLinq.Indexing.IndexCollection`1" class="text-break">IndexCollection&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Represents a collection of indexes attached to an indexed collection.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.LiveLinq.Indexing.ScannerCollection-1.html">ScannerCollection</a>&lt;T&gt;</div>
    <div class="level2"><span class="xref">IndexCollection&lt;T&gt;</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2">IDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.lambdaexpression">LambdaExpression</a>, <a class="xref" href="C1.LiveLinq.Indexing.Index-1.html">Index</a>&lt;T&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.lambdaexpression">LambdaExpression</a>, <a class="xref" href="C1.LiveLinq.Indexing.Index-1.html">Index</a>&lt;T&gt;&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.lambdaexpression">LambdaExpression</a>, <a class="xref" href="C1.LiveLinq.Indexing.Index-1.html">Index</a>&lt;T&gt;&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="C1.LiveLinq.Indexing.Search.IIndexScanner-1.html">IIndexScanner</a>&lt;T&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="C1.LiveLinq.Indexing.Search.IIndexScanner-1.html">IIndexScanner</a>&lt;T&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.LiveLinq.Indexing.html">C1.LiveLinq.Indexing</a></h6>
  <h6><strong>Assembly</strong>: C1.LiveLinq.4.8.dll</h6>
  <h5 id="C1_LiveLinq_Indexing_IndexCollection_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class IndexCollection&lt;T&gt; : ScannerCollection&lt;T&gt;, IDictionary&lt;LambdaExpression, Index&lt;T&gt;&gt;, ICollection&lt;KeyValuePair&lt;LambdaExpression, Index&lt;T&gt;&gt;&gt;, IEnumerable&lt;KeyValuePair&lt;LambdaExpression, Index&lt;T&gt;&gt;&gt;, ICollection&lt;IIndexScanner&lt;T&gt;&gt;, IEnumerable&lt;IIndexScanner&lt;T&gt;&gt;, IEnumerable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class IndexCollection(Of T)
    Inherits ScannerCollection(Of T)
    Implements IDictionary(Of LambdaExpression, Index(Of T)), ICollection(Of KeyValuePair(Of LambdaExpression, Index(Of T))), IEnumerable(Of KeyValuePair(Of LambdaExpression, Index(Of T))), ICollection(Of IIndexScanner(Of T)), IEnumerable(Of IIndexScanner(Of T)), IEnumerable</code></pre>
  </div>
  <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 elements of the indexed collection.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 id="C1_LiveLinq_Indexing_IndexCollection_1_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>Any indexed collection (implementing the <a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource&lt;T&gt;</a> interface) has a
collection of indexes attached to it.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1__ctor_C1_LiveLinq_IObservableSource__0__" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.#ctor(C1.LiveLinq.IObservableSource{`0})">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.-ctor.html#C1_LiveLinq_Indexing_IndexCollection_1__ctor_C1_LiveLinq_IObservableSource__0__">IndexCollection(IObservableSource&lt;T&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.html">IndexCollection&lt;T&gt;</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Count" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Count">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Count.html#C1_LiveLinq_Indexing_IndexCollection_1_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of indexes in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Item_System_Linq_Expressions_LambdaExpression_" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Item(System.Linq.Expressions.LambdaExpression)">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Item.html#C1_LiveLinq_Indexing_IndexCollection_1_Item_System_Linq_Expressions_LambdaExpression_">this[LambdaExpression]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the index with the specified key selector.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Add__1_System_Linq_Expressions_Expression_System_Func__0___0___" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Add``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Add.html#C1_LiveLinq_Indexing_IndexCollection_1_Add__1_System_Linq_Expressions_Expression_System_Func__0___0___">Add&lt;TKey&gt;(Expression&lt;Func&lt;T, TKey&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new index and adds it to the collection of indexes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Add__1_System_Linq_Expressions_Expression_System_Func__0___0___System_Boolean_" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Add``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.Boolean)">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Add.html#C1_LiveLinq_Indexing_IndexCollection_1_Add__1_System_Linq_Expressions_Expression_System_Func__0___0___System_Boolean_">Add&lt;TKey&gt;(Expression&lt;Func&lt;T, TKey&gt;&gt;, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new index and adds it to the collection of indexes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Clear" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Clear">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Clear.html#C1_LiveLinq_Indexing_IndexCollection_1_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"><p>Clears the collection of all indexes. All indexes are detached from the indexed collection and destroyed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Find_System_Linq_Expressions_LambdaExpression_" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Find(System.Linq.Expressions.LambdaExpression)">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Find.html#C1_LiveLinq_Indexing_IndexCollection_1_Find_System_Linq_Expressions_LambdaExpression_">Find(LambdaExpression)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds an index in the collection by its key selector.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Find__1_System_Linq_Expressions_Expression_System_Func__0___0___" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Find``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Find.html#C1_LiveLinq_Indexing_IndexCollection_1_Find__1_System_Linq_Expressions_Expression_System_Func__0___0___">Find&lt;TKey&gt;(Expression&lt;Func&lt;T, TKey&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds an index in the collection by its key selector.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_GetEnumerator" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.GetEnumerator">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.GetEnumerator.html#C1_LiveLinq_Indexing_IndexCollection_1_GetEnumerator">GetEnumerator()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns an enumerator that iterates through the <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.html">IndexCollection&lt;T&gt;</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Remove_C1_LiveLinq_Indexing_Index__0__" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Remove(C1.LiveLinq.Indexing.Index{`0})">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Remove.html#C1_LiveLinq_Indexing_IndexCollection_1_Remove_C1_LiveLinq_Indexing_Index__0__">Remove(Index&lt;T&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes an index from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_Indexing_IndexCollection_1_Remove_System_Linq_Expressions_LambdaExpression_" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.Remove(System.Linq.Expressions.LambdaExpression)">
          <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.Remove.html#C1_LiveLinq_Indexing_IndexCollection_1_Remove_System_Linq_Expressions_LambdaExpression_">Remove(LambdaExpression)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes an index from the collection.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.LiveLinq.Hints.Indexed.html#C1_LiveLinq_Hints_Indexed__1___0_">Hints.Indexed&lt;T&gt;(T)</a>
  </div>
  <div>
      <a class="xref" href="C1.LiveLinq.Hints.Indexed.html#C1_LiveLinq_Hints_Indexed__1___0_C1_LiveLinq_IndexingHintAction_">Hints.Indexed&lt;T&gt;(T, IndexingHintAction)</a>
  </div>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.Indexes.html#C1_LiveLinq_Indexing_IIndexedSource_1_Indexes">Indexes</a></div>
      <div><a class="xref" href="C1.LiveLinq.Collections.IndexedCollection-1.Indexes.html#C1_LiveLinq_Collections_IndexedCollection_1_Indexes">Indexes</a></div>
      <div><a class="xref" href="C1.LiveLinq.AdoNet.IndexedDataTable-1.Indexes.html#C1_LiveLinq_AdoNet_IndexedDataTable_1_Indexes">Indexes</a></div>
      <div><a class="xref" href="C1.LiveLinq.LiveViews.View-1.Indexes.html#C1_LiveLinq_LiveViews_View_1_Indexes">Indexes</a></div>
      <div><a class="xref" href="C1.LiveLinq.LiveViews.ViewRowCollection.Indexes.html#C1_LiveLinq_LiveViews_ViewRowCollection_Indexes">Indexes</a></div>
  </div>

</div>
