title: What is the collection equivalent of a multi-dimensional array?
body: <p>I've got a group of data that looks like this:</p>
  
  <pre><code>001 001 One
  001 002 Two
  001 003 Three
  
  002 001 One
  002 002 Two
  002 003 Three
  
  ...
  </code></pre>
  
  <p>Now, certainly, I could create an array of string[x][y] = z, but this array has to be resizable, and i'd prefer to use the string representations of the indexers than convert to numeric.  The reason is that i will need to look up the data by string, and i don't see the point in needless string->number conversions.</p>
  
  <p>My first thought was this:</p>
  
  <pre><code>Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt; data;
  
  data = new Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt;();
  
  Dictionary&lt;string, string&gt; subdata = Dictionary&lt;string, string&gt;();
  
  subdata.Add(key, string);
  data.add(key2, subdata);
  </code></pre>
  
  <p>and this works, but is somewhat cumbersome.  It also feels wrong and kludgy and not particularly efficient.</p>
  
  <p>So what's the best way to store this sort of data in a collection?  </p>
  
  <p>I also thought of creating my own collection class, but I'd rather not if I don't have to.  I'd rather just use the existing tools.</p>