# C1.Document.C1SortedList-2

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Document_C1SortedList_2" data-uid="C1.Document.C1SortedList`2" class="text-break">C1SortedList&lt;TKey, TValue&gt; Class
</h1>
  <div class="markdown level0 summary"><p>The sorted list class.</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">C1SortedList&lt;TKey, TValue&gt;</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TValue&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Document.html">C1.Document</a></h6>
  <h6><strong>Assembly</strong>: C1.Document.dll</h6>
  <h5 id="C1_Document_C1SortedList_2_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1SortedList&lt;TKey, TValue&gt; : IEnumerable&lt;TValue&gt;, IEnumerable where TKey : IComparable&lt;TKey&gt;</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1SortedList(Of TKey As IComparable(Of TKey), TValue)
    Implements IEnumerable(Of TValue), IEnumerable</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">TKey</span></td>
        <td><p>The type of key.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">TValue</span></td>
        <td><p>The type of value.</p>
</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_Document_C1SortedList_2__ctor" data-uid="C1.Document.C1SortedList`2.#ctor">
          <a class="xref" href="C1.Document.C1SortedList-2.-ctor.html#C1_Document_C1SortedList_2__ctor">C1SortedList()</a>
        </td>
        <td class="markdown level1 summary"></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_Document_C1SortedList_2_Count" data-uid="C1.Document.C1SortedList`2.Count">
          <a class="xref" href="C1.Document.C1SortedList-2.Count.html#C1_Document_C1SortedList_2_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of elements contained in the keys collection.</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_Document_C1SortedList_2_Add__0__1_" data-uid="C1.Document.C1SortedList`2.Add(`0,`1)">
          <a class="xref" href="C1.Document.C1SortedList-2.Add.html#C1_Document_C1SortedList_2_Add__0__1_">Add(TKey, TValue)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds value to the list, returns index of the added value, throws exception if value with specified key already exists.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1SortedList_2_Clear" data-uid="C1.Document.C1SortedList`2.Clear">
          <a class="xref" href="C1.Document.C1SortedList-2.Clear.html#C1_Document_C1SortedList_2_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all elements from the keys and values collections.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1SortedList_2_TryGetValue__0__1__" data-uid="C1.Document.C1SortedList`2.TryGetValue(`0,`1@)">
          <a class="xref" href="C1.Document.C1SortedList-2.TryGetValue.html#C1_Document_C1SortedList_2_TryGetValue__0__1__">TryGetValue(TKey, out TValue)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the value by specified key.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
