title: How to name a dictionary?
body: <p>Are there any conventions / guidelines for naming associative arrays (e.g. <code>Dictionary&lt;TKey, TValue&gt;</code>) in .NET?</p>
  
  <p>For example, is there a better way to name <code>dict</code> in:</p>
  
  <pre><code>var dict = new Dictionary&lt;Foo, Bar&gt;();
  </code></pre>
  
  <p>Some names I've used / seen:</p>
  
  <pre><code>foosToBars
  mapFromFooToBar
  barsByFoo
  barsForFoos
  </code></pre>
  
  <p>I've also seen some types in the BCL choosing 'nicer' sounding names that don't directly reveal what the key and value are supposed to represent, such as in <a href="http://msdn.microsoft.com/en-us/library/dd287075#Y739" rel="noreferrer">this method</a>.</p>
  
  <p>How about for multimaps (e.g. <code>ILookup&lt;TKey, TElement&gt;</code>)?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Perhaps my example was slightly poor; I didn't mean to focus on the <em>types</em> of the key and value.</p>
  
  <p>How about if it was:</p>
  
  <pre><code>// key = Name of person, value = Age of person
  var dict = new Dictionary&lt;string, int&gt;();
  </code></pre>
  
  <p>With the samples updated to:</p>
  
  <pre><code>namesToAges
  mapFromNameToAge
  agesByName
  agesForNames
  </code></pre>