title: .NET Dictionary vs Class Properties
body: <p>Coming from a javascript background, collections like dictionaries are often implemented as objects because their properties can be referenced by association:</p>
  <pre><code>// js example
  var myDict = {
    key1 : &quot;value1&quot;,
    key2 : &quot;value2&quot;
  };
  
  myDict.key1;    // &quot;value1&quot;
  myDict[&quot;key1&quot;]; // &quot;value1&quot;
  </code></pre>
  <p>However, in C# it seems we have to choose between static singleton classes and generic dictionaries for each effect.  While I like that classes are strongly typed and give intellisense support, Dictionary methods offer flexibility I'm hesitant to give up. Are there performance considerations so great in C# that I should choose one over the other?</p>