# C1.DataCollection.C1DynamicList-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_DataCollection_C1DynamicList_1" data-uid="C1.DataCollection.C1DynamicList`1" class="text-break">C1DynamicList&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>List which can be initialized with an arbitrary <a class="xref" href="C1.DataCollection.C1DynamicList-1.Count.html#C1_DataCollection_C1DynamicList_1_Count">Count</a> of (null) items.</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">C1DynamicList&lt;T&gt;</span></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.ilist">IList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></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_C1DynamicList_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class C1DynamicList&lt;T&gt; : IReadOnlyList&lt;T?&gt;, IReadOnlyCollection&lt;T?&gt;, IList&lt;T?&gt;, ICollection&lt;T?&gt;, IEnumerable&lt;T?&gt;, IList, ICollection, IEnumerable, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class C1DynamicList(Of T)
    Implements IReadOnlyList(Of T), IReadOnlyCollection(Of T), IList(Of T), ICollection(Of T), IEnumerable(Of T), IList, ICollection, 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>
  <h5 id="C1_DataCollection_C1DynamicList_1_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>This collection optimizes the memory for large collections needing to allocate memory on demand.</p>
</div>
  <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_C1DynamicList_1__ctor" data-uid="C1.DataCollection.C1DynamicList`1.#ctor">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.-ctor.html#C1_DataCollection_C1DynamicList_1__ctor">C1DynamicList()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1DynamicList-1.html">C1DynamicList&lt;T&gt;</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1__ctor_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.#ctor(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.-ctor.html#C1_DataCollection_C1DynamicList_1__ctor_System_Int32_System_Int32_">C1DynamicList(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.C1DynamicList-1.html">C1DynamicList&lt;T&gt;</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_C1DynamicList_1_Count" data-uid="C1.DataCollection.C1DynamicList`1.Count">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Count.html#C1_DataCollection_C1DynamicList_1_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of items(and nulls) in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_IsFixedSize" data-uid="C1.DataCollection.C1DynamicList`1.IsFixedSize">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.IsFixedSize.html#C1_DataCollection_C1DynamicList_1_IsFixedSize">IsFixedSize</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_IsReadOnly" data-uid="C1.DataCollection.C1DynamicList`1.IsReadOnly">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.IsReadOnly.html#C1_DataCollection_C1DynamicList_1_IsReadOnly">IsReadOnly</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the collection is read-only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_IsSynchronized" data-uid="C1.DataCollection.C1DynamicList`1.IsSynchronized">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.IsSynchronized.html#C1_DataCollection_C1DynamicList_1_IsSynchronized">IsSynchronized</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Item_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.Item(System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Item.html#C1_DataCollection_C1DynamicList_1_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the item at the specified <code class="paramref">index</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_SyncRoot" data-uid="C1.DataCollection.C1DynamicList`1.SyncRoot">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.SyncRoot.html#C1_DataCollection_C1DynamicList_1_SyncRoot">SyncRoot</a>
        </td>
        <td class="markdown level1 summary"></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_C1DynamicList_1_Add_System_Object_" data-uid="C1.DataCollection.C1DynamicList`1.Add(System.Object)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Add.html#C1_DataCollection_C1DynamicList_1_Add_System_Object_">Add(object?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Add__0_" data-uid="C1.DataCollection.C1DynamicList`1.Add(`0)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Add.html#C1_DataCollection_C1DynamicList_1_Add__0_">Add(T?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Clear" data-uid="C1.DataCollection.C1DynamicList`1.Clear">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Clear.html#C1_DataCollection_C1DynamicList_1_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_ClearRange_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.ClearRange(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.ClearRange.html#C1_DataCollection_C1DynamicList_1_ClearRange_System_Int32_System_Int32_">ClearRange(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets to null 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_C1DynamicList_1_Clone" data-uid="C1.DataCollection.C1DynamicList`1.Clone">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Clone.html#C1_DataCollection_C1DynamicList_1_Clone">Clone()</a>
        </td>
        <td class="markdown level1 summary"><p>Clones this instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Contains_System_Object_" data-uid="C1.DataCollection.C1DynamicList`1.Contains(System.Object)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Contains.html#C1_DataCollection_C1DynamicList_1_Contains_System_Object_">Contains(object?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Contains__0_" data-uid="C1.DataCollection.C1DynamicList`1.Contains(`0)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Contains.html#C1_DataCollection_C1DynamicList_1_Contains__0_">Contains(T?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_CopyTo_System_Array_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.CopyTo(System.Array,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.CopyTo.html#C1_DataCollection_C1DynamicList_1_CopyTo_System_Array_System_Int32_">CopyTo(Array, int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_CopyTo__0___System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.CopyTo(`0[],System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.CopyTo.html#C1_DataCollection_C1DynamicList_1_CopyTo__0___System_Int32_">CopyTo(T?[], int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Dispose" data-uid="C1.DataCollection.C1DynamicList`1.Dispose">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Dispose.html#C1_DataCollection_C1DynamicList_1_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_FindIndex_System_Int32_System_Int32_System_Predicate__0__" data-uid="C1.DataCollection.C1DynamicList`1.FindIndex(System.Int32,System.Int32,System.Predicate{`0})">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.FindIndex.html#C1_DataCollection_C1DynamicList_1_FindIndex_System_Int32_System_Int32_System_Predicate__0__">FindIndex(int, int, Predicate&lt;T?&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within the
range of elements in the System.Collections.Generic.List`1 that starts at the
specified index and contains the specified number of elements.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_GetEnumerator" data-uid="C1.DataCollection.C1DynamicList`1.GetEnumerator">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.GetEnumerator.html#C1_DataCollection_C1DynamicList_1_GetEnumerator">GetEnumerator()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_GetItems_System_Boolean_System_Nullable_System_Int32__System_Nullable_System_Int32__" data-uid="C1.DataCollection.C1DynamicList`1.GetItems(System.Boolean,System.Nullable{System.Int32},System.Nullable{System.Int32})">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.GetItems.html#C1_DataCollection_C1DynamicList_1_GetItems_System_Boolean_System_Nullable_System_Int32__System_Nullable_System_Int32__">GetItems(bool, int?, int?)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the items in the list.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_IndexOf_System_Object_" data-uid="C1.DataCollection.C1DynamicList`1.IndexOf(System.Object)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.IndexOf.html#C1_DataCollection_C1DynamicList_1_IndexOf_System_Object_">IndexOf(object?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_IndexOf__0_" data-uid="C1.DataCollection.C1DynamicList`1.IndexOf(`0)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.IndexOf.html#C1_DataCollection_C1DynamicList_1_IndexOf__0_">IndexOf(T?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Insert_System_Int32_System_Object_" data-uid="C1.DataCollection.C1DynamicList`1.Insert(System.Int32,System.Object)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Insert.html#C1_DataCollection_C1DynamicList_1_Insert_System_Int32_System_Object_">Insert(int, object?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Insert_System_Int32__0_" data-uid="C1.DataCollection.C1DynamicList`1.Insert(System.Int32,`0)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Insert.html#C1_DataCollection_C1DynamicList_1_Insert_System_Int32__0_">Insert(int, T?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_InsertRange_System_Int32_System_Collections_Generic_IEnumerable__0__" data-uid="C1.DataCollection.C1DynamicList`1.InsertRange(System.Int32,System.Collections.Generic.IEnumerable{`0})">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.InsertRange.html#C1_DataCollection_C1DynamicList_1_InsertRange_System_Int32_System_Collections_Generic_IEnumerable__0__">InsertRange(int, IEnumerable&lt;T?&gt;)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_InsertRange_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.InsertRange(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.InsertRange.html#C1_DataCollection_C1DynamicList_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 items (nulls) at the specified <code class="paramref">startingIndex</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_MoveRange_System_Int32_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.MoveRange(System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.MoveRange.html#C1_DataCollection_C1DynamicList_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_C1DynamicList_1_Remove_System_Object_" data-uid="C1.DataCollection.C1DynamicList`1.Remove(System.Object)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Remove.html#C1_DataCollection_C1DynamicList_1_Remove_System_Object_">Remove(object?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_Remove__0_" data-uid="C1.DataCollection.C1DynamicList`1.Remove(`0)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.Remove.html#C1_DataCollection_C1DynamicList_1_Remove__0_">Remove(T?)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_RemoveAt_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.RemoveAt(System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.RemoveAt.html#C1_DataCollection_C1DynamicList_1_RemoveAt_System_Int32_">RemoveAt(int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_DataCollection_C1DynamicList_1_RemoveRange_System_Int32_System_Int32_" data-uid="C1.DataCollection.C1DynamicList`1.RemoveRange(System.Int32,System.Int32)">
          <a class="xref" href="C1.DataCollection.C1DynamicList-1.RemoveRange.html#C1_DataCollection_C1DynamicList_1_RemoveRange_System_Int32_System_Int32_">RemoveRange(int, int)</a>
        </td>
        <td class="markdown level1 summary"></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>
