# C1.DataCollection.C1ConvertDataCollection-2.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_C1ConvertDataCollection_2__ctor_" data-uid="C1.DataCollection.C1ConvertDataCollection`2.#ctor*">C1ConvertDataCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_C1ConvertDataCollection_2__ctor_" data-uid="C1.DataCollection.C1ConvertDataCollection`2.#ctor*"></a>
<h4 id="C1_DataCollection_C1ConvertDataCollection_2__ctor_System_Collections_IEnumerable_" data-uid="C1.DataCollection.C1ConvertDataCollection`2.#ctor(System.Collections.IEnumerable)">C1ConvertDataCollection(IEnumerable)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1ConvertDataCollection-2.html">C1ConvertDataCollection&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 C1ConvertDataCollection(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>


<a id="C1_DataCollection_C1ConvertDataCollection_2__ctor_" data-uid="C1.DataCollection.C1ConvertDataCollection`2.#ctor*"></a>
<h4 id="C1_DataCollection_C1ConvertDataCollection_2__ctor_System_Collections_IEnumerable_System_Func_System_Collections_Generic_IReadOnlyList__0__System_Int32__1__System_Func__1__0__" data-uid="C1.DataCollection.C1ConvertDataCollection`2.#ctor(System.Collections.IEnumerable,System.Func{System.Collections.Generic.IReadOnlyList{`0},System.Int32,`1},System.Func{`1,`0})">C1ConvertDataCollection(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.C1ConvertDataCollection-2.html">C1ConvertDataCollection&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 C1ConvertDataCollection(IEnumerable source, Func&lt;IReadOnlyList&lt;S&gt;, int, T&gt; convert, Func&lt;T, S&gt;? convertBack = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(source As IEnumerable, convert As Func(Of IReadOnlyList(Of S), Integer, T), Optional convertBack 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">convert</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">convertBack</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>
</div>
