# C1.LiveLinq.Indexing.IndexCollection-1.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_Indexing_IndexCollection_1__ctor_" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.#ctor*">IndexCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_Indexing_IndexCollection_1__ctor_" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.#ctor*"></a>
<h4 id="C1_LiveLinq_Indexing_IndexCollection_1__ctor_C1_LiveLinq_IObservableSource__0__" data-uid="C1.LiveLinq.Indexing.IndexCollection`1.#ctor(C1.LiveLinq.IObservableSource{`0})">IndexCollection(IObservableSource&lt;T&gt;)</h4>
<div 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>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IndexCollection(IObservableSource&lt;T&gt; source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(source As IObservableSource(Of 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="C1.LiveLinq.IObservableSource-1.html">IObservableSource</a>&lt;T&gt;</td>
      <td><span class="parametername">source</span></td>
      <td><p>The collection to be indexed.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_LiveLinq_Indexing_IndexCollection_1__ctor_C1_LiveLinq_IObservableSource__0___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Normally, you don't need to create instances of the <a class="xref" href="C1.LiveLinq.Indexing.IndexCollection-1.html">IndexCollection&lt;T&gt;</a> class in your code,
they already exist in the instances of LiveLinq indexed collection classes.
You need to create them explicitly in code only if you define your own indexable collection class and then only if
it does not inherit from <a class="xref" href="C1.LiveLinq.Collections.IndexedCollection-1.html">IndexedCollection&lt;T&gt;</a>.</p>
</div>
</div>
