# C1.DataCollection.C1TreeDataCollection-1.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_C1TreeDataCollection_1__ctor_" data-uid="C1.DataCollection.C1TreeDataCollection`1.#ctor*">C1TreeDataCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_C1TreeDataCollection_1__ctor_" data-uid="C1.DataCollection.C1TreeDataCollection`1.#ctor*"></a>
<h4 id="C1_DataCollection_C1TreeDataCollection_1__ctor_System_Collections_IEnumerable_System_String_" data-uid="C1.DataCollection.C1TreeDataCollection`1.#ctor(System.Collections.IEnumerable,System.String)">C1TreeDataCollection(IEnumerable, string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1TreeDataCollection-1.html">C1TreeDataCollection&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 C1TreeDataCollection(IEnumerable source, string childrenPath)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(source As IEnumerable, childrenPath As String)</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 from which the tree is built.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">childrenPath</span></td>
      <td><p>The path property of the items of type <code class="typeparamref">T</code></p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_DataCollection_C1TreeDataCollection_1__ctor_" data-uid="C1.DataCollection.C1TreeDataCollection`1.#ctor*"></a>
<h4 id="C1_DataCollection_C1TreeDataCollection_1__ctor_System_Collections_IEnumerable_System_Collections_Generic_IReadOnlyList_System_String__" data-uid="C1.DataCollection.C1TreeDataCollection`1.#ctor(System.Collections.IEnumerable,System.Collections.Generic.IReadOnlyList{System.String})">C1TreeDataCollection(IEnumerable, IReadOnlyList&lt;string&gt;)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1TreeDataCollection-1.html">C1TreeDataCollection&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 C1TreeDataCollection(IEnumerable source, IReadOnlyList&lt;string&gt; childrenPaths)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(source As IEnumerable, childrenPaths As IReadOnlyList(Of String))</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 from which the tree is built.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</td>
      <td><span class="parametername">childrenPaths</span></td>
      <td><p>The list of paths to build the tree.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
