title: Easy way to Populate a Dictionary<string,List<string>>
body: <p>Greetings Guru's, my objective is to create a Dictionary of Lists, does a simpler technique exist?</p>
  
  <p>I prefer the List(t) to IEnumerable(t) which is why I chose the Dictionary of Lists over Ilookup or IGrouping.</p>
  
  <p>The code works but it seems like a messy way of doing things.</p>
  
  <pre><code>string[] files = Directory.GetFiles (@"C:\test");
  
  Dictionary&lt;string,List&lt;string&gt;&gt; DataX = new Dictionary&lt;string,List&lt;string&gt;&gt;();
  
  foreach (var group in files.GroupBy (file =&gt; Path.GetExtension (file)))
  {
     DataX.Add (group.Key, group.ToList());
  }
  </code></pre>