# C1.DataCollection.C1LengthList-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_DataCollection_C1LengthList_1" data-uid="C1.DataCollection.C1LengthList`1" class="text-break">C1LengthList&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Virtual list of numbers optimized for getting the accumulation up to a specified index;</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"><span class="xref">C1LengthList&lt;T&gt;</span></div>
      <div class="level2"><a class="xref" href="C1.DataCollection.C1LengthList.html">C1LengthList</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.DataCollection.html">C1.DataCollection</a></h6>
  <h6><strong>Assembly</strong>: C1.DataCollection.dll</h6>
  <h5 id="C1_DataCollection_C1LengthList_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1LengthList&lt;T&gt; : IReadOnlyList&lt;T&gt;, IReadOnlyCollection&lt;T&gt;, IList&lt;T&gt;, ICollection&lt;T&gt;, IEnumerable&lt;T&gt;, IEnumerable, IDisposable where T : struct, INumber&lt;T&gt;</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1LengthList(Of T As {Structure, INumber(Of T)})
    Implements IReadOnlyList(Of T), IReadOnlyCollection(Of T), IList(Of T), ICollection(Of T), IEnumerable(Of T), IEnumerable, IDisposable</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></td>
      </tr>
    </tbody>
  </table>
  <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_DataCollection_C1LengthList_1__ctor_System_Int32__0_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.#ctor(System.Int32,`0,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.-ctor.html#C1_DataCollection_C1LengthList_1__ctor_System_Int32__0_System_Int32_">C1LengthList(int, T, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1LengthList.html">C1LengthList</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_DataCollection_C1LengthList_1_Count" data-uid="C1.DataCollection.C1LengthList`1.Count">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Count.html#C1_DataCollection_C1LengthList_1_Count">Count</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_IsReadOnly" data-uid="C1.DataCollection.C1LengthList`1.IsReadOnly">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.IsReadOnly.html#C1_DataCollection_C1LengthList_1_IsReadOnly">IsReadOnly</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_Item_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.Item(System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Item.html#C1_DataCollection_C1LengthList_1_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_TotalLength" data-uid="C1.DataCollection.C1LengthList`1.TotalLength">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.TotalLength.html#C1_DataCollection_C1LengthList_1_TotalLength">TotalLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the accumulation of all the lengths in the list.</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_DataCollection_C1LengthList_1_Add__0_" data-uid="C1.DataCollection.C1LengthList`1.Add(`0)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Add.html#C1_DataCollection_C1LengthList_1_Add__0_">Add(T)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_Clear" data-uid="C1.DataCollection.C1LengthList`1.Clear">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Clear.html#C1_DataCollection_C1LengthList_1_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_ClearRange_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.ClearRange(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.ClearRange.html#C1_DataCollection_C1LengthList_1_ClearRange_System_Int32_System_Int32_">ClearRange(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets to the default length the items in the range for the specified parameters <code class="paramref">startingIndex</code> and <code class="paramref">count</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_Contains__0_" data-uid="C1.DataCollection.C1LengthList`1.Contains(`0)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Contains.html#C1_DataCollection_C1LengthList_1_Contains__0_">Contains(T)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_CopyTo__0___System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.CopyTo(`0[],System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.CopyTo.html#C1_DataCollection_C1LengthList_1_CopyTo__0___System_Int32_">CopyTo(T[], int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_Dispose" data-uid="C1.DataCollection.C1LengthList`1.Dispose">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Dispose.html#C1_DataCollection_C1LengthList_1_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_GetEnumerator" data-uid="C1.DataCollection.C1LengthList`1.GetEnumerator">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.GetEnumerator.html#C1_DataCollection_C1LengthList_1_GetEnumerator">GetEnumerator()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_GetOffset_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.GetOffset(System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.GetOffset.html#C1_DataCollection_C1LengthList_1_GetOffset_System_Int32_">GetOffset(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the accumulated length up to the indicated index (not including).</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_GetOffset_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.GetOffset(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.GetOffset.html#C1_DataCollection_C1LengthList_1_GetOffset_System_Int32_System_Int32_">GetOffset(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the accumulated length between the specified indexes (including both).</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_IndexOf__0_" data-uid="C1.DataCollection.C1LengthList`1.IndexOf(`0)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.IndexOf.html#C1_DataCollection_C1LengthList_1_IndexOf__0_">IndexOf(T)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_Insert_System_Int32__0_" data-uid="C1.DataCollection.C1LengthList`1.Insert(System.Int32,`0)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Insert.html#C1_DataCollection_C1LengthList_1_Insert_System_Int32__0_">Insert(int, T)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_InsertRange_System_Int32_System_Collections_Generic_IEnumerable__0__" data-uid="C1.DataCollection.C1LengthList`1.InsertRange(System.Int32,System.Collections.Generic.IEnumerable{`0})">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.InsertRange.html#C1_DataCollection_C1LengthList_1_InsertRange_System_Int32_System_Collections_Generic_IEnumerable__0__">InsertRange(int, IEnumerable&lt;T&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Inserts the specified <code class="paramref">newItems</code> at the <code class="paramref">startingIndex</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_InsertRange_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.InsertRange(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.InsertRange.html#C1_DataCollection_C1LengthList_1_InsertRange_System_Int32_System_Int32_">InsertRange(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Inserts the specified <code class="paramref">count</code> of default length items at the specified <code class="paramref">startingIndex</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_MoveRange_System_Int32_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.MoveRange(System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.MoveRange.html#C1_DataCollection_C1LengthList_1_MoveRange_System_Int32_System_Int32_System_Int32_">MoveRange(int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Moves the number of items specified by <code class="paramref">count</code> from <code class="paramref">oldIndex</code> to <code class="paramref">newIndex</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_Remove__0_" data-uid="C1.DataCollection.C1LengthList`1.Remove(`0)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.Remove.html#C1_DataCollection_C1LengthList_1_Remove__0_">Remove(T)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_RemoveAt_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.RemoveAt(System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.RemoveAt.html#C1_DataCollection_C1LengthList_1_RemoveAt_System_Int32_">RemoveAt(int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_RemoveRange_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1LengthList`1.RemoveRange(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.RemoveRange.html#C1_DataCollection_C1LengthList_1_RemoveRange_System_Int32_System_Int32_">RemoveRange(int, int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1LengthList_1_SetItem_System_Int32__0_" data-uid="C1.DataCollection.C1LengthList`1.SetItem(System.Int32,`0)">
          <a class="xref" href="C1.DataCollection.C1LengthList-1.SetItem.html#C1_DataCollection_C1LengthList_1_SetItem_System_Int32__0_">SetItem(int, T)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets an item at the specified index.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.DataCollection.IDataCollectionEx.AsDataCollection.html#C1_DataCollection_IDataCollectionEx_AsDataCollection__1_System_Collections_IEnumerable_">IDataCollectionEx.AsDataCollection&lt;T&gt;(IEnumerable)</a>
  </div>
  <div>
      <a class="xref" href="C1.DataCollection.IDataCollectionEx.ToDataCollection.html#C1_DataCollection_IDataCollectionEx_ToDataCollection__1_System_Collections_IEnumerable_">IDataCollectionEx.ToDataCollection&lt;T&gt;(IEnumerable)</a>
  </div>

</div>
