# C1.DataCollection.C1DynamicList-1.GetItems

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_C1DynamicList_1_GetItems_" data-uid="C1.DataCollection.C1DynamicList`1.GetItems*">GetItems Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_C1DynamicList_1_GetItems_" data-uid="C1.DataCollection.C1DynamicList`1.GetItems*"></a>
<h4 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})">GetItems(bool, int?, int?)</h4>
<div class="markdown level1 summary"><p>Returns the items in the list.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IEnumerable&lt;Tuple&lt;int, T?&gt;&gt; GetItems(bool onlyNonNullItems = false, int? from = null, int? to = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetItems(Optional onlyNonNullItems As Boolean = False, Optional from As Integer? = Nothing, Optional [to] As Integer? = Nothing) As IEnumerable(Of Tuple(Of Integer, 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.boolean">bool</a></td>
      <td><span class="parametername">onlyNonNullItems</span></td>
      <td><p>Only return those items that aren't null. Passing this parameter to true is convenient for huge lists having mostly nulls.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</td>
      <td><span class="parametername">from</span></td>
      <td><p>The starting index to return items.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</td>
      <td><span class="parametername">to</span></td>
      <td><p>The last index to return items.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.tuple-2">Tuple</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, T&gt;&gt;</td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
