# C1.DataCollection.C1SelectDataCollection-2.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_C1SelectDataCollection_2__ctor_" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor*">C1SelectDataCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_C1SelectDataCollection_2__ctor_" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor*"></a>
<h4 id="C1_DataCollection_C1SelectDataCollection_2__ctor_System_Collections_IEnumerable_System_Func_System_Int32__0__1__" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor(System.Collections.IEnumerable,System.Func{System.Int32,`0,`1})">C1SelectDataCollection(IEnumerable, Func&lt;int, S, T&gt;)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1SelectDataCollection-2.html">C1SelectDataCollection&lt;S, 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 C1SelectDataCollection(IEnumerable source, Func&lt;int, S, T&gt; select)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(source As IEnumerable, [select] As Func(Of Integer, S, 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.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The source.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, S, T&gt;</td>
      <td><span class="parametername">select</span></td>
      <td><p>Select function which converts a source item into an item of this collection.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_DataCollection_C1SelectDataCollection_2__ctor_" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor*"></a>
<h4 id="C1_DataCollection_C1SelectDataCollection_2__ctor_System_Collections_IEnumerable_System_Func_System_Collections_Generic_IReadOnlyList__0__System_Int32__1__System_Func__1__0__" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor(System.Collections.IEnumerable,System.Func{System.Collections.Generic.IReadOnlyList{`0},System.Int32,`1},System.Func{`1,`0})">C1SelectDataCollection(IEnumerable, Func&lt;IReadOnlyList&lt;S&gt;, int, T&gt;, Func&lt;T, S&gt;?)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1SelectDataCollection-2.html">C1SelectDataCollection&lt;S, 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 C1SelectDataCollection(IEnumerable source, Func&lt;IReadOnlyList&lt;S&gt;, int, T&gt; select, Func&lt;T, S&gt;? selectBack = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(source As IEnumerable, [select] As Func(Of IReadOnlyList(Of S), Integer, T), Optional selectBack As Func(Of T, S) = Nothing)</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.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The source.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;S&gt;, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, T&gt;</td>
      <td><span class="parametername">select</span></td>
      <td><p>Select function which converts a source item into an item of this collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;T, S&gt;</td>
      <td><span class="parametername">selectBack</span></td>
      <td><p>Function that gives the source item from the collection item. Used to insert and replace operations.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_DataCollection_C1SelectDataCollection_2__ctor_" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor*"></a>
<h4 id="C1_DataCollection_C1SelectDataCollection_2__ctor_System_Collections_IEnumerable_" data-uid="C1.DataCollection.C1SelectDataCollection`2.#ctor(System.Collections.IEnumerable)">C1SelectDataCollection(IEnumerable)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1SelectDataCollection-2.html">C1SelectDataCollection&lt;S, 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">protected C1SelectDataCollection(IEnumerable source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Sub New(source As IEnumerable)</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.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The source.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
