title: HashMap. Create entry (int, string[]) and push into value immediately
body: <p>I want to get all files of the same size in buckets according, size is a key.</p>
  <p>Default behaviour would override the value whenever you associate it with an existing key. I want to push a value to string[] array whenever the same value is met.
  1556 - &quot;1.txt&quot; - Entry added to the dictionary, 1.txt put to the string[]
  1556 - &quot;7.txt&quot; - 7.txt pushed to the string[] associated with 1556</p>
  <p>My current thought is to enumerate once through all files and create entries with keys and empty arrays in the dictionary:</p>
  <pre><code>foreach(var file in directory){
  map[file.length] = new string[]/List&lt;string&gt;();
  </code></pre>
  <p>then enumerate second time retrieving array associated with current key:</p>
  <pre><code>foreach(var file in directory){
  map[file.length].push(file.name);
  }
  </code></pre>
  <p>Are there any better ways to do this?</p>