title: Returning Dictionary as ICollection
body: <p>I have a interface that can implement various collections and data types, it works fine with some collection but the dictionary is giving me issues, I'm guessing because the Dictionary is a little different and has key value pairs?</p>
  
  <pre><code>public interface IStructure
  {
      void InsertRun&lt;T&gt; (T item);
      ICollection RetrieveSortedListRun&lt;T&gt;();
      T RetrieveItemRun&lt;T&gt;(T item);
  }
  
  class DictionaryRun : IStructure
  {
      IDictionary&lt;int, object&gt; dictionary;
  
      public DictionaryRun()
      {
          dictionary = new Dictionary&lt;int, object&gt;();
      }
  
      public void InsertRun&lt;T&gt;(T item)
      {
          dictionary.Add(dictionary.Count + 1, item);
      }
  
      public ICollection RetrieveSortedListRun&lt;T&gt;()
      {
          return dictionary;
      }
  
      public T RetrieveItemRun&lt;T&gt;(T item)
      {
          return item;
      }
  }
  </code></pre>