title: Get list values of list from dictionary in C#
body: <p>I have the following code snippet to add string values to a List and then add the list as the key in a dictionary. Now I want to print both the key and the value from the Dictionary but I'm unable to do so.  Any ideas or suggestions will be appreciated. </p>
  
  <pre><code>Dictionary&lt;List&lt;string&gt;, int&gt; dic = new Dictionary&lt;List&lt;string&gt;, int&gt;();
  
  List&lt;string&gt; mylist = new List&lt;string&gt;();
  string[] str = new string[5];
  int counter = 0;
  for (int i = 0; i &lt; 5; i++)
  {
      Console.Write("Type Number:");
      string test = Console.ReadLine();
      mylist.Add(test);
      counter++;
  }
  
  Console.WriteLine(string.Join(",", mylist));
  dic.Add(mylist, counter);
  </code></pre>