# GrapeCity.Documents.Common.OwnedSortedDictionary-2

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Common_OwnedSortedDictionary_2" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2" class="text-break">OwnedSortedDictionary&lt;TKey, TValue&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Represents a collection of key/value pairs that are sorted on the key.
Values should support <a class="xref" href="GrapeCity.Documents.Common.IOwnedObject.html">IOwnedObject</a> interface, collection updates their Owner property.</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"><a class="xref" href="GrapeCity.Documents.Common.ObservableSortedDictionary-2.html">ObservableSortedDictionary</a>&lt;TKey, TValue&gt;</div>
    <div class="level2"><span class="xref">OwnedSortedDictionary&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.idictionary-2">IDictionary</a>&lt;TKey, TValue&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.idictionary">IDictionary</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.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;TKey, TValue&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
    <div><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.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
    <div><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.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="GrapeCity.Documents.Common.IOwnedObject.html">IOwnedObject</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Common.html">GrapeCity.Documents.Common</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Imaging.dll</h6>
  <h5 id="GrapeCity_Documents_Common_OwnedSortedDictionary_2_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class OwnedSortedDictionary&lt;TKey, TValue&gt; : ObservableSortedDictionary&lt;TKey, TValue&gt;, IDictionary&lt;TKey, TValue&gt;, ICollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, ICollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, IDictionary, ICollection, IReadOnlyDictionary&lt;TKey, TValue&gt;, IReadOnlyCollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, IEnumerable&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, IReadOnlyCollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, IEnumerable&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, IEnumerable, IOwnedObject where TValue : IOwnedObject</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class OwnedSortedDictionary(Of TKey, TValue As IOwnedObject)
    Inherits ObservableSortedDictionary(Of TKey, TValue)
    Implements IDictionary(Of TKey, TValue), ICollection(Of KeyValuePair(Of TKey, TValue)), ICollection(Of KeyValuePair(Of TKey, TValue)), IDictionary, ICollection, IReadOnlyDictionary(Of TKey, TValue), IReadOnlyCollection(Of KeyValuePair(Of TKey, TValue)), IEnumerable(Of KeyValuePair(Of TKey, TValue)), IReadOnlyCollection(Of KeyValuePair(Of TKey, TValue)), IEnumerable(Of KeyValuePair(Of TKey, TValue)), IEnumerable, IOwnedObject</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 the keys in the dictionary.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">TValue</span></td>
        <td><p>The type of the values in the dictionary.</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="GrapeCity_Documents_Common_OwnedSortedDictionary_2__ctor" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.#ctor">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.-ctor.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2__ctor">OwnedSortedDictionary()</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="GrapeCity_Documents_Common_OwnedSortedDictionary_2_Owner" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.Owner">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.Owner.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2_Owner">Owner</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a collection owner.</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="GrapeCity_Documents_Common_OwnedSortedDictionary_2_AddItem__0__1_" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.AddItem(`0,`1)">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.AddItem.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2_AddItem__0__1_">AddItem(TKey, TValue)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds an element into collection with specified key.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_OwnedSortedDictionary_2_ClearItems" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.ClearItems">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.ClearItems.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2_ClearItems">ClearItems()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all elements from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_OwnedSortedDictionary_2_RemoveItem__0_" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.RemoveItem(`0)">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.RemoveItem.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2_RemoveItem__0_">RemoveItem(TKey)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes an element with specified key.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_OwnedSortedDictionary_2_SetItem__0__1_" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.SetItem(`0,`1)">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.SetItem.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2_SetItem__0__1_">SetItem(TKey, TValue)</a>
        </td>
        <td class="markdown level1 summary"><p>Replaces the element with the specified key.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_OwnedSortedDictionary_2_SetOwner_System_Object_" data-uid="GrapeCity.Documents.Common.OwnedSortedDictionary`2.SetOwner(System.Object)">
          <a class="xref" href="GrapeCity.Documents.Common.OwnedSortedDictionary-2.SetOwner.html#GrapeCity_Documents_Common_OwnedSortedDictionary_2_SetOwner_System_Object_">SetOwner(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the owner of the current object.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
