# GrapeCity.Documents.Common.StructList-1.Sort

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Common_StructList_1_Sort_" data-uid="GrapeCity.Documents.Common.StructList`1.Sort*">Sort Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Common_StructList_1_Sort_" data-uid="GrapeCity.Documents.Common.StructList`1.Sort*"></a>
<h4 id="GrapeCity_Documents_Common_StructList_1_Sort_GrapeCity_Documents_Common_StructComparison__0__" data-uid="GrapeCity.Documents.Common.StructList`1.Sort(GrapeCity.Documents.Common.StructComparison{`0})">Sort(StructComparison&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Sorts the elements in the entire <a class="xref" href="GrapeCity.Documents.Common.StructList-1.html">StructList&lt;T&gt;</a> using the specified <a class="xref" href="GrapeCity.Documents.Common.StructComparison-1.html">StructComparison&lt;T&gt;</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Sort(StructComparison&lt;T&gt; comparison)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Sort(comparison As StructComparison(Of 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="GrapeCity.Documents.Common.StructComparison-1.html">StructComparison</a>&lt;T&gt;</td>
      <td><span class="parametername">comparison</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Common.StructComparison-1.html">StructComparison&lt;T&gt;</a> to use when comparing elements.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Common_StructList_1_Sort_" data-uid="GrapeCity.Documents.Common.StructList`1.Sort*"></a>
<h4 id="GrapeCity_Documents_Common_StructList_1_Sort_System_Int32_System_Int32_GrapeCity_Documents_Common_StructComparison__0__" data-uid="GrapeCity.Documents.Common.StructList`1.Sort(System.Int32,System.Int32,GrapeCity.Documents.Common.StructComparison{`0})">Sort(int, int, StructComparison&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Sorts the elements in a range of elements in <a class="xref" href="GrapeCity.Documents.Common.StructList-1.html">StructList&lt;T&gt;</a> using the specified <a class="xref" href="GrapeCity.Documents.Common.StructComparison-1.html">StructComparison&lt;T&gt;</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Sort(int index, int count, StructComparison&lt;T&gt; comparison)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Sort(index As Integer, count As Integer, comparison As StructComparison(Of 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.int32">int</a></td>
      <td><span class="parametername">index</span></td>
      <td><p>The zero-based starting index of the range to sort.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>The length of the range to sort.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Common.StructComparison-1.html">StructComparison</a>&lt;T&gt;</td>
      <td><span class="parametername">comparison</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Common.StructComparison-1.html">StructComparison&lt;T&gt;</a> to use when comparing elements.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Common_StructList_1_Sort_" data-uid="GrapeCity.Documents.Common.StructList`1.Sort*"></a>
<h4 id="GrapeCity_Documents_Common_StructList_1_Sort_GrapeCity_Documents_Common_IStructComparer__0__" data-uid="GrapeCity.Documents.Common.StructList`1.Sort(GrapeCity.Documents.Common.IStructComparer{`0})">Sort(IStructComparer&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Sorts the elements in the entire <a class="xref" href="GrapeCity.Documents.Common.StructList-1.html">StructList&lt;T&gt;</a> using the specified comparer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Sort(IStructComparer&lt;T&gt; comparer)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Sort(comparer As IStructComparer(Of 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="GrapeCity.Documents.Common.IStructComparer-1.html">IStructComparer</a>&lt;T&gt;</td>
      <td><span class="parametername">comparer</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Common.IStructComparer-1.html">IStructComparer&lt;T&gt;</a> implementation to use when comparing elements.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Common_StructList_1_Sort_" data-uid="GrapeCity.Documents.Common.StructList`1.Sort*"></a>
<h4 id="GrapeCity_Documents_Common_StructList_1_Sort_System_Int32_System_Int32_GrapeCity_Documents_Common_IStructComparer__0__" data-uid="GrapeCity.Documents.Common.StructList`1.Sort(System.Int32,System.Int32,GrapeCity.Documents.Common.IStructComparer{`0})">Sort(int, int, IStructComparer&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Sorts the elements in a range of elements in <a class="xref" href="GrapeCity.Documents.Common.StructList-1.html">StructList&lt;T&gt;</a> using the specified comparer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Sort(int index, int count, IStructComparer&lt;T&gt; comparer)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Sort(index As Integer, count As Integer, comparer As IStructComparer(Of 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.int32">int</a></td>
      <td><span class="parametername">index</span></td>
      <td><p>The zero-based starting index of the range to sort.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>The length of the range to sort.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Common.IStructComparer-1.html">IStructComparer</a>&lt;T&gt;</td>
      <td><span class="parametername">comparer</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Common.IStructComparer-1.html">IStructComparer&lt;T&gt;</a> implementation to use when comparing elements.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
