title: Implementing a LinkedHashTable in C# with given Table C#
body: <p>For an assignment for school I have to create a LinkedHashTable in C#. The teacher has given me a Table interface that I must go by, but I'm a little lost as to whether or not I'm making a HashTable/Dictionary in my LinkedHashTable class as if it was a data member and doing whatever management to make it linked.
  What I had originally did was make a:</p>
  
  <pre><code>Dictionary&lt;Key, List&lt;Value&gt;&gt; hash;
  </code></pre>
  
  <p>in the LinkedHashTable class I made and the get, put, and contains methods I implemented pertained to that structure. Here is the table interface: </p>
  
  <pre><code>interface Table&lt;Key, Value&gt; : IEnumerable&lt;Key&gt;
  {
      /// &lt;summary&gt;
      /// Add a new entry in the hash table. If an entry with the
      /// given key already exists, it is replaced without error.
      /// put() always succeeds.
      /// (Details left to implementing classes.)
      /// &lt;/summary&gt;
      /// &lt;param name="k"&gt;the key for the new or existing entry&lt;/param&gt;
      /// &lt;param name="v"&gt;the (new) value for the key&lt;/param&gt;
      void Put(Key k, Value v);
  
      /// &lt;summary&gt;
      /// Does an entry with the given key exist?
      /// &lt;/summary&gt;
      /// &lt;param name="k"&gt;the key being sought&lt;/param&gt;
      /// &lt;returns&gt;true iff the key exists in the table&lt;/returns&gt;
      bool Contains(Key k);
  
      /// &lt;summary&gt;
      /// Fetch the value associated with the given key.
      /// &lt;/summary&gt;
      /// &lt;param name="k"&gt;The key to be looked up in the table&lt;/param&gt;
      /// &lt;returns&gt;the value associated with the given key&lt;/returns&gt;
      /// &lt;exception cref="NonExistentKey"&gt;if Contains(key) is false&lt;/exception&gt;
      Value Get(Key k);
  }
  </code></pre>
  
  <p>In the test file, he's got stuff like:</p>
  
  <pre><code>ht.Put("Chris", "Swiss");
  try
  {
  
  foreach (String first in ht)
  {
       Console.WriteLine("5");
       Console.WriteLine(first + " -&gt; " + ht.Get(first));
  }
  </code></pre>
  
  <p>The whole foreach loop makes me think that I'm supposed to implement my class in a way such that it is a LinkedHashTable in itsself, not just some class having a HashTable as a member. Unfortunately, I'm pretty confused as to how to do this. Any suggestions would be nice. </p>